From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=michael.d.kinney@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 3359721B00DC1 for ; Tue, 14 Nov 2017 16:58:33 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2017 17:02:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,397,1505804400"; d="scan'208";a="176295188" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.241.98.51]) by fmsmga006.fm.intel.com with ESMTP; 14 Nov 2017 17:02:40 -0800 From: Michael D Kinney To: edk2-devel@lists.01.org Cc: Star Zeng , Eric Dong Date: Tue, 14 Nov 2017 17:02:34 -0800 Message-Id: <20171115010236.1344-1-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.14.2.windows.3 Subject: [Patch V2 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: Wed, 15 Nov 2017 00:58:33 -0000 https://bugzilla.tianocore.org/show_bug.cgi?id=767 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 | 8 +++++++- MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c | 14 +++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) -- 2.14.2.windows.3