From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 555A61A1E3C for ; Tue, 20 Sep 2016 23:13:45 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 20 Sep 2016 23:13:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,372,1470726000"; d="scan'208";a="1034036315" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 20 Sep 2016 23:13:44 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 20 Sep 2016 23:13:43 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 20 Sep 2016 23:13:43 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.118]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.95]) with mapi id 14.03.0248.002; Wed, 21 Sep 2016 14:13:41 +0800 From: "Tian, Feng" To: Yosuke Katayama1 , "edk2-devel@lists.01.org" CC: "Tian, Feng" Thread-Topic: [EDK2][USB IF]Mismatch between EDK2 and a USB vendor Thread-Index: AdITFZMHVZgoGvsCSa6tGMQRy/m9VwAhhnJAAAzGKxA= Date: Wed, 21 Sep 2016 06:13:40 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE566E1D722@SHSMSX101.ccr.corp.intel.com> References: <5F5B41F3CAC51543B46516F1A5F982DC24BCE1F7@APMAILMBX03.lenovo.com> In-Reply-To: <5F5B41F3CAC51543B46516F1A5F982DC24BCE1F7@APMAILMBX03.lenovo.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: [USB IF]Mismatch between EDK2 and a USB vendor X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 06:13:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Katayama We never receive such feedback on inconsecutive usb interface number. I agr= ee EDKII usb driver should be able to handle this. I am working on a fix, but I have no such device at hand. Could you help me= verify it when the patch is ready?=20 PS: what host controller are you using? EHCI or XHCI? Thanks Feng -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yosu= ke Katayama1 Sent: Wednesday, September 21, 2016 8:05 AM To: edk2-devel@lists.01.org Subject: [edk2] [EDK2][USB IF]Mismatch between EDK2 and a USB vendor Hello,=20 This is relating to my previous post "[edk2] Is this a right place to discu= ss EDK2's USB IF implementation?"=20 We found a mismatch between EDK2 source code and our USB vendor's implement= ation. Could you give us your opinions? bInterfaceNumber , 9.6.5 Interface from Universal Serial Bus 3.1 Specificat= ion Rev 1.0 says; -- Number of this interface. Zero-based value identifying the index in the arr= ay of concurrent interfaces supported by this configuration. -- Regarding this. EDK2 source code (UsbDesc.c) says: -- // // If a configuration has several interfaces, these interfaces are // numbered from zero to n... // -- The USB vendor says: -- * Numbering is not necessarily consecutive * Each interface can be independ= ently turned on/off * Solution allows any combination of interfaces without= re-defining the interface number * One general lookup table can tell you w= hat interface is assigned to what interface number. * For these reasons, the interface definition is like this on our products. * The interface definition has remained the same from the previous products= , and other products before that. * Current interface numbering is supported by all Microsoft OS * Other PC O= EM customers have never raised this issue -- As a result, the vendor's USB IF looks like below. =3D=3D=3D>Configuration Descriptor<=3D=3D=3D ... bNumInterfaces: 0x02 <<<< bConfigurationValue: 0x01 iConfiguration: 0x00 bmAttributes: 0xA0 -> Bus Powered -> Remote Wakeup ... =3D=3D=3D>Interface Descriptor<=3D=3D=3D ... bInterfaceNumber: 0x0C <<<< Interface Number starts fro= m 0x0C instead of 0. [comment from Yosuke] bAlternateSetting: 0x00 bNumEndpoints: 0x01 ... =3D=3D=3D>Interface Descriptor<=3D=3D=3D ... bInterfaceNumber: 0x0D <<<< bAlternateSetting: 0x00 bNumEndpoints: 0x00 ... and it hits the following ON_ERROR in UsbDesc.c. -- } else if (Setting->Desc.InterfaceNumber >=3D NumIf) { DEBUG (( EFI_D_ERROR, "UsbParseConfigDesc: mal-formated interface des= criptor\n")); UsbFreeInterfaceDesc (Setting); goto ON_ERROR; } -- What do you think the vendor's implementation? Also, have you ever had such a USB IF mismatch between EDK2 and USB vendors= before? If so, how are you handling such cases in general? Kind regards, Yosuke _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel