From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.6525.1587877945691046762 for ; Sat, 25 Apr 2020 22:12:25 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: hao.a.wu@intel.com) IronPort-SDR: RvByuo0zvZxyEvuNKiVc8HOOhDbSIaS8MICmZFY85L41KkbpEmtssZuiaRAU6lJYg2+f5mgNPt L2bAdMD1MHSg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2020 22:12:25 -0700 IronPort-SDR: oVyD3LHpfGPazQeFjv7bEjsscwGMWuatK/C1Vg+pURLoBqX1Ng/621tJ7ztZ3sa6qMMK0lL+2j +Tge4eot1B3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,318,1583222400"; d="scan'208";a="256849883" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 25 Apr 2020 22:12:25 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 25 Apr 2020 22:12:25 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 25 Apr 2020 22:12:23 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sat, 25 Apr 2020 22:12:23 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.209]) with mapi id 14.03.0439.000; Sun, 26 Apr 2020 13:12:20 +0800 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Wu, Hao A" , "Jiang, Guomin" CC: "Wang, Jian J" , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/UsbBusDxe: Rebuild the description table after Reset Device Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/UsbBusDxe: Rebuild the description table after Reset Device Thread-Index: AQHWGqH+6oJcz8EY40K8DVzwoZo6F6iK2sQggAACMZA= Date: Sun, 26 Apr 2020 05:12:19 +0000 Message-ID: References: <20200425013620.1159-1-guomin.jiang@intel.com> In-Reply-To: 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 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Wu, Hao A > Sent: Sunday, April 26, 2020 1:10 PM > To: Jiang, Guomin; devel@edk2.groups.io > Cc: Wang, Jian J; Ni, Ray > Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/UsbBusDxe: Rebuild the > description table after Reset Device >=20 > > -----Original Message----- > > From: Jiang, Guomin > > Sent: Saturday, April 25, 2020 9:36 AM > > To: devel@edk2.groups.io > > Cc: Wang, Jian J; Wu, Hao A; Ni, Ray > > Subject: [PATCH] MdeModulePkg/UsbBusDxe: Rebuild the description table > > after Reset Device > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2694 > > > > When the USB fail and then Reset Device, it should rebuild description= . > > > > Signed-off-by: Guomin Jiang > > Cc: Jian J Wang > > Cc: Hao A Wu > > Cc: Ray Ni > > --- > > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c > > b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c > > index 4b4915c019..9f2d2cc87f 100644 > > --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c > > +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c > > @@ -869,6 +869,11 @@ UsbIoPortReset ( > > > > > > DEBUG (( EFI_D_INFO, "UsbIoPortReset: device is now ADDRESSED > > at %d\n", Dev->Address)); > > > > > > > > + // > > > > + // The description will be invalid after reset, should rebuild it a= s well. > > > > + // > > > > + UsbBuildDescTable (Dev); >=20 >=20 > Hello Guomin, >=20 > Thanks for the proposed patch. >=20 > Could you help to explain in more detail for the above fix with regard t= o the > transfer ring not being set properly in the XHCI driver? Thanks. >=20 > Also, judging from the function description comments in UsbBuildDescTabl= e(): > |> /** > |> Build the whole array of descriptors. This function must > |> be called after UsbGetMaxPacketSize0 returns the max packet > |> size correctly for endpoint 0. > |> ... > |> **/ > |> EFI_STATUS > |> UsbBuildDescTable ( > |> IN USB_DEVICE *UsbDev > |> ) >=20 > Does function UsbGetMaxPacketSize0() need to be called before > UsbBuildDescTable() in the proposed fix? One more thing, could you help to add the information for what tests have = been done for the proposed patch as well? Thanks in advance. >=20 > Best Regards, > Hao Wu >=20 >=20 > > > > + > > > > // > > > > // Reset the current active configure, after this device > > > > // is in CONFIGURED state. > > > > -- > > 2.25.1.windows.1 >=20 >=20 >=20