From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=michael.d.kinney@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 017862034BBC0 for ; Wed, 15 Nov 2017 19:53:51 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Nov 2017 19:58:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,402,1505804400"; d="scan'208";a="1244699915" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.241.98.51]) by fmsmga002.fm.intel.com with ESMTP; 15 Nov 2017 19:58:00 -0800 From: Michael D Kinney To: edk2-devel@lists.01.org Cc: Star Zeng , Eric Dong Date: Wed, 15 Nov 2017 19:57:53 -0800 Message-Id: <20171116035755.12448-1-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.14.2.windows.3 Subject: [Patch V3 0/2] Add Max LUN status/value checks X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 03:53:52 -0000 https://bugzilla.tianocore.org/show_bug.cgi?id=767 Changes in V3 * Only check number of bytes transfered if Direction is not UsbNoData. Add error check to USB I/O Protocol UsbControlTransfer() for the number of bytes actually transfered. If less than requested, then return EFI_DEVICE_ERROR. Check Get Max LUN status/value in USB Mass Storage Driver to handle cases where USB device does not support Get Max LUN command or returned an invalud Max LUN value. Cc: Star Zeng Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney Michael D Kinney (2): MdeModulePkg/UsbBusDxe: Add UsbControlTransfer() error check MdeModulePkg/UsbMassStorageDxe: Check Get Max LUN status/value MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c | 16 +++++++++++++++- MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c | 14 +++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) -- 2.14.2.windows.3