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=star.zeng@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 E23512034BBC0 for ; Wed, 15 Nov 2017 20:25:50 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Nov 2017 20:29:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,402,1505804400"; d="scan'208";a="149974519" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 15 Nov 2017 20:29:57 -0800 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 15 Nov 2017 20:28:58 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 15 Nov 2017 20:28:57 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.152]) with mapi id 14.03.0319.002; Thu, 16 Nov 2017 12:28:56 +0800 From: "Zeng, Star" To: "Kinney, Michael D" , "edk2-devel@lists.01.org" CC: "Dong, Eric" , "Zeng, Star" Thread-Topic: [Patch V3 0/2] Add Max LUN status/value checks Thread-Index: AQHTXo8fnVohTiDStEClQGzLp5oJuqMWaZfg Date: Thu, 16 Nov 2017 04:28:55 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B9B5FEF@shsmsx102.ccr.corp.intel.com> References: <20171116035755.12448-1-michael.d.kinney@intel.com> In-Reply-To: <20171116035755.12448-1-michael.d.kinney@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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 04:25:51 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng Thanks, Star -----Original Message----- From: Kinney, Michael D=20 Sent: Thursday, November 16, 2017 11:58 AM To: edk2-devel@lists.01.org Cc: Zeng, Star ; Dong, Eric Subject: [Patch V3 0/2] Add Max LUN status/value checks https://bugzilla.tianocore.org/show_bug.cgi?id=3D767 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 w= here 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