From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.groups.io (mail04.groups.io [45.79.224.9]) by spool.mail.gandi.net (Postfix) with ESMTPS id E6847940101 for ; Mon, 15 Apr 2024 02:16:49 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=71FwyCtw2ppPVVcfr39636SRxWVdCSoY50knM6P4v+k=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1713147408; v=1; b=DjTw5yCmJ1NKqAGZzgheqVZM66Dr56za1mogMJz6I9O8Q3rshqRzri5LJqWmFERM36iSNL8x cRU0XQTJtmnOAiF4A+l8FEPMXi/TlVtQnA8aG849CaRSx6SNY31FgHV7n4LYPWrfto8T020Oxdm nnFHDd3JTe5edfpJ/rdQXy+8FEEHB3CVZhqHWLRZGf/YXsMVMfJJBlgizadB5q5wSr4fW2UKtSx 6kalmoeJ8PKUlsDnpxkt69rigJDfNdWkzJrqWEZduZHb3lLOMylAuTL1x/qj9WuPURhgYXkvNYl yvmOtFB1XRjIqe+fpk2Gv0KmnqfZxIC4jc+s8sojf8BRw== X-Received: by 127.0.0.2 with SMTP id i1mLYY7687511xvvEnxquLXy; Sun, 14 Apr 2024 19:16:48 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by mx.groups.io with SMTP id smtpd.web10.11757.1713147408084557450 for ; Sun, 14 Apr 2024 19:16:48 -0700 X-CSE-ConnectionGUID: 6w6rEbjnSTeAkQO/KIzO/Q== X-CSE-MsgGUID: 4LCzu0LFRqKBFYpZPkroqA== X-IronPort-AV: E=McAfee;i="6600,9927,11044"; a="19118837" X-IronPort-AV: E=Sophos;i="6.07,202,1708416000"; d="scan'208,217";a="19118837" X-Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2024 19:16:48 -0700 X-CSE-ConnectionGUID: WZtUVTMORHeb6sVcZvf/XQ== X-CSE-MsgGUID: l1T4vnmdRcWTci4xpIZy0g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,202,1708416000"; d="scan'208,217";a="52711590" X-Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 14 Apr 2024 19:16:47 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 14 Apr 2024 19:16:47 -0700 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 14 Apr 2024 19:16:46 -0700 X-Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Sun, 14 Apr 2024 19:16:46 -0700 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sun, 14 Apr 2024 19:16:46 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by SJ2PR11MB7454.namprd11.prod.outlook.com (2603:10b6:a03:4cc::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.29; Mon, 15 Apr 2024 02:16:41 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c%7]) with mapi id 15.20.7452.049; Mon, 15 Apr 2024 02:16:41 +0000 From: "Ni, Ray" To: Liming Gao CC: "Huang, Jenny" , "Shih, More" , "devel@edk2.groups.io" , "Lewandowski, Krzysztof" , "Cai, Xianglei" , "Lewandowski, Krzysztof" Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/XhciDxe: Reset endpoint while USB Transaction error Thread-Topic: [PATCH 1/1] MdeModulePkg/XhciDxe: Reset endpoint while USB Transaction error Thread-Index: AQHadDwIBockrtiRY0y2+XfFfrqcgrFjRF+AgADLkwCABL0vwA== Date: Mon, 15 Apr 2024 02:16:41 +0000 Message-ID: References: <2ef49d5cd3593dc573f3fac9db533b4a93ef04b5.1710220024.git.xianglei.cai@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|SJ2PR11MB7454:EE_ x-ms-office365-filtering-correlation-id: 154d00dc-3fc9-44de-c789-08dc5cf216ec x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: BwOINwzCLhUG77aEN0VuYf3wJJe2Y7T/lgXtK806zaC0D1V2/PYgDOuskGs1jz9w15GW/WAKmIpLnDNQXMKG836r4b39f2PDODwoyRFVj1GgniXhJw/TM5D2xdN6GHp1JzRPNYS85hhRehyzJGLjpCJhG0TFpuR4kaPChLx0mUGkZItoKWF3Hr0HHnMxVjm+5oYzRGWxCrqceBikCJSfnbRBT3DT3kD/gPIIntdqtzh6S0obn6F1YlDN3/B+0gplf0jN9jBIklZqpEew+ZSdYgF93TiAk6IIi0u4JpJaVymw5GKpUu/KCDM1bGKezK/VNCfvMxeve+UZ3kV30W6PFjoIbsJjenn3Yzx4tXIG4Y2AOemCfYMTJjX5wMgO81REtzXrYeli4J5tqRnG4PPfJjPkFEFg86gCwrOzqwNLULfVkehi91sWhOxwRV1+Qi9zkIQ8GSqlo2qGzr4i8M7GNKOcQtNd8L4rNwAjOiDZnIrVbR513WRmViPNvQv9k0gm/Xb9N2+AtlRd+ywksSBb1TvO6iM5tnDVMQfXObxxr/vdcRQOY/+FenSgzUenrpD6CtpH24UGUuwk7lfVCqCKttC7OMNSy15k7EUz9B4mRV7zDlEidNvBqEb0WjezffsRi+PS8GOwIoTBpEIbN0uY4Sohphyr1uXFfatRKfkowZI= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4nD2Jy56+6M6PyGGVjCv46zdVsnNPlb+OFWmK9UaDLWTpF6l4Cw5OVl9CsYH?= =?us-ascii?Q?JAkkdC8eDY/t1DgKa/MDdwVQSIk/b7uoTA10ZGwY01YnCmDzV6D2eGaTuoX4?= =?us-ascii?Q?ZrjFP0HyhEU+L/038Nbk2ThhmMwVmBVUvC7mMy3ZjqYj9REvdxyNirehSqka?= =?us-ascii?Q?o4oftZ3mAaxhZqcGiW6kNTV+/HFZj5JSynf8VkwE2o4mFn7kPh6tiTM2qmLm?= =?us-ascii?Q?8TMqgUKaBXMsR06MOny9PL8WeEWNi7uWt5hqb420YMNiw9SDzByUxJXXSIWD?= =?us-ascii?Q?AmD4op3PzyWJMJNqm3ZBXQJ6NNw2ahLCQ7npO8rViiw/PXk28u04shSNj1cW?= =?us-ascii?Q?OJPMRrI2+BCReEy71rLjk1peaepATHMiXLWMVWYWlAhjfZfRrF05/xlHfePM?= =?us-ascii?Q?/AH1Dxl8j645BCECNWPGBwnEpeZNGBhWyg7Aoij4kA9K+uotxvZ+WcbbqTXP?= =?us-ascii?Q?bLTCe2x6hYv+rZEuGQrl9rWpVlYE4AdCbJD34xKSO/ob0sSLXFpvSqTdsCJY?= =?us-ascii?Q?SdFq/ffxAPm+S1PiOThX6Pudlq33Pot8iJc5FDkWkfoEuHlcH3Mk9DvqCO9F?= =?us-ascii?Q?+ic14emDan3m/mR9pKngAqc3tavSonRZFKZZ30HU5/ZlbsT7SkJy++422z9K?= =?us-ascii?Q?rLwM4ZquqgL1t7YB6+6wi7YgSLikwolBJsokxQx+1RnMS7L9eQndSZ2lgCRM?= =?us-ascii?Q?NoLN/VN8LT6HACGhilxNliW4KH/8w/PzFdMA8ndHt2HNFiP+wImyIcNrMwZ7?= =?us-ascii?Q?TsW2NPCjhNOKahR2VeU2mRdWfo60tNn/DNPjgJ3koet+dHnsvUrek9W76Muv?= =?us-ascii?Q?1dnKgGZXWd4xygPs07NbqCuJXJgluIpRWnsGtyxqjSXmbc4pf+iH3d/ZEiI1?= =?us-ascii?Q?2h0kWYPxDV5njqOdzaolisXWgl/8+uwIBFWQbMpcUnKELlC945b6WbYwJHZH?= =?us-ascii?Q?g1enAaun5dVmiEgK2exx+Bm6jczRH0Y6gCWLwSHRb1l51dty9FLFxXi/z/4u?= =?us-ascii?Q?FgxT4urcWqQvdCw8U+v2ZLN+Uu1wPKpzfp7KOgsl7hCvSXIreYxkw49ihDvV?= =?us-ascii?Q?48Kn4V/3mRc0RaL4wDuEiEWLFrumpGThjay11wj/P2zZyN4wLik3L44sk2ft?= =?us-ascii?Q?tw/StFxKHrmvche9+ynQH/XAu5n8BKphAwl7Rq1xAGZU+Q3iTjk57uey8Qs7?= =?us-ascii?Q?YZcy3ALOT+SaZIlzc6br+QwUGWURlbspxwttJZqaCNG30RUgrOBnZIepyvMz?= =?us-ascii?Q?DHdhfl/W4CPsebkIN9noPDFMVYy17j9wsIX6VxiGGTaTgXhRyxX9e8hbGusO?= =?us-ascii?Q?R3Y3uKNJ3HEZPOAhe6nD2YKokDFfN91LBZnhqY2AUTBHMPlqJWeHHMtVOaeN?= =?us-ascii?Q?EOVLGthi3DHRWUh85bb4eNr1705BfQvHY01rlV0v5F/mZdkiNghfs/33vKY7?= =?us-ascii?Q?Djadl1ThYsG44EYFuzfhVwbqXcudos8b1AqOXU3QWzNeS8P1blRMR3Lz/Uka?= =?us-ascii?Q?u01xV1tDLrhpdRQj54BXaLs1GiyND1+Im6cwJUvcxPUA8LE4N9m6nZduirZu?= =?us-ascii?Q?D6BNQwEP4r1RmnjlbnA=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 154d00dc-3fc9-44de-c789-08dc5cf216ec X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2024 02:16:41.5800 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +VVaWTWS1MebfY+06H0EKgqj6jTJbDBYMf20rRXpeCEU1y/3CY6kd4JkOMTkp0ILDXU/hTMgYlbC2aYKpl+JTA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7454 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Sun, 14 Apr 2024 19:16:48 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: gHpG1HUcE3l66hq1b0Ygmxssx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB82444FAE2CF0E3E39B6596C88C092MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=DjTw5yCm; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.9 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_MN6PR11MB82444FAE2CF0E3E39B6596C88C092MN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Liming, Can you give a R-B? Thanks, Ray ________________________________ From: Cai, Xianglei Sent: Friday, April 12, 2024 9:53 To: Lewandowski, Krzysztof ; devel@edk2.gr= oups.io ; Ni, Ray ; Liming Gao Cc: Huang, Jenny ; Shih, More Subject: RE: [PATCH 1/1] MdeModulePkg/XhciDxe: Reset endpoint while USB Tra= nsaction error @Ni, Ray @Liming GaoWould you like to merge the patch to upstream? Thanks, Xianglei From: Lewandowski, Krzysztof Sent: Thursday, April 11, 2024 9:45 PM To: devel@edk2.groups.io Cc: Ni, Ray ; Liming Gao ; Huan= g, Jenny ; Shih, More ; Cai, Xi= anglei Subject: Re: [PATCH 1/1] MdeModulePkg/XhciDxe: Reset endpoint while USB Tra= nsaction error Looks good to me. Reviewed-by: Krzysztof Lewandowski > ________________________________ From: Cai, Xianglei > Sent: Wednesday, April 10, 2024 09:02 To: devel@edk2.groups.io > Cc: Cai, Xianglei >; = Ni, Ray >; Liming Gao >; Lewandowski, Krzysztof >; Hu= ang, Jenny >; Shih, Mor= e > Subject: [PATCH 1/1] MdeModulePkg/XhciDxe: Reset endpoint while USB Transac= tion error https://bugzilla.tianocore.org/show_bug.cgi?id=3D4556 Based on XHCI spec 4.8.3, software should do the reset endpoint while USB Transaction occur. Also add the error code for USB Transaction error since UEFI spec don't have the related definition. Cc: Ray Ni > Cc: Liming Gao > Cc: Krzysztof Lewandowski > Cc: Jenny Huang > Cc: More Shih > Signed-off-by: Xianglei Cai > --- MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 2 +- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 2 +- MdePkg/Include/Protocol/UsbIo.h | 21 +++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/Xhc= iDxe/Xhci.c index f4e61d223c1b..63cc29b26536 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c @@ -825,7 +825,7 @@ XhcTransfer ( *TransferResult =3D Urb->Result; *DataLength =3D Urb->Completed; - if ((*TransferResult =3D=3D EFI_USB_ERR_STALL) || (*TransferResult =3D= =3D EFI_USB_ERR_BABBLE)) { + if ((*TransferResult =3D=3D EFI_USB_ERR_STALL) || (*TransferResult =3D= =3D EFI_USB_ERR_BABBLE) || (*TransferResult =3D=3D EFI_USB_ERR_TRANSACTION)= ) { ASSERT (Status =3D=3D EFI_DEVICE_ERROR); RecoveryStatus =3D XhcRecoverHaltedEndpoint (Xhc, Urb); if (EFI_ERROR (RecoveryStatus)) { diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pc= i/XhciDxe/XhciSched.c index 05528a478baf..e77852f62f10 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -1193,7 +1193,7 @@ XhcCheckUrbResult ( goto EXIT; case TRB_COMPLETION_USB_TRANSACTION_ERROR: - CheckedUrb->Result |=3D EFI_USB_ERR_TIMEOUT; + CheckedUrb->Result |=3D EFI_USB_ERR_TRANSACTION; CheckedUrb->Finished =3D TRUE; DEBUG ((DEBUG_ERROR, "XhcCheckUrbResult: TRANSACTION_ERROR! Comple= tecode =3D %x\n", EvtTrb->Completecode)); goto EXIT; diff --git a/MdePkg/Include/Protocol/UsbIo.h b/MdePkg/Include/Protocol/UsbI= o.h index a780b4e07b44..211ef0c94156 100644 --- a/MdePkg/Include/Protocol/UsbIo.h +++ b/MdePkg/Include/Protocol/UsbIo.h @@ -50,16 +50,17 @@ typedef enum { // // USB Transfer Results // -#define EFI_USB_NOERROR 0x00 -#define EFI_USB_ERR_NOTEXECUTE 0x01 -#define EFI_USB_ERR_STALL 0x02 -#define EFI_USB_ERR_BUFFER 0x04 -#define EFI_USB_ERR_BABBLE 0x08 -#define EFI_USB_ERR_NAK 0x10 -#define EFI_USB_ERR_CRC 0x20 -#define EFI_USB_ERR_TIMEOUT 0x40 -#define EFI_USB_ERR_BITSTUFF 0x80 -#define EFI_USB_ERR_SYSTEM 0x100 +#define EFI_USB_NOERROR 0x00 +#define EFI_USB_ERR_NOTEXECUTE 0x01 +#define EFI_USB_ERR_STALL 0x02 +#define EFI_USB_ERR_BUFFER 0x04 +#define EFI_USB_ERR_BABBLE 0x08 +#define EFI_USB_ERR_NAK 0x10 +#define EFI_USB_ERR_CRC 0x20 +#define EFI_USB_ERR_TIMEOUT 0x40 +#define EFI_USB_ERR_BITSTUFF 0x80 +#define EFI_USB_ERR_SYSTEM 0x100 +#define EFI_USB_ERR_TRANSACTION 0x200 /** Async USB transfer callback routine. -- 2.42.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117745): https://edk2.groups.io/g/devel/message/117745 Mute This Topic: https://groups.io/mt/104879589/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB82444FAE2CF0E3E39B6596C88C092MN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Liming,
Can you give a R-B?

Thanks,
Ray

From: Cai, Xianglei <xia= nglei.cai@intel.com>
Sent: Friday, April 12, 2024 9:53
To: Lewandowski, Krzysztof <krzysztof.lewandowski@intel.com>; = devel@edk2.groups.io <devel@edk2.groups.io>; Ni, Ray <ray.ni@intel= .com>; Liming Gao <gaoliming@byosoft.com.cn>
Cc: Huang, Jenny <jenny.huang@intel.com>; Shih, More <more.= shih@intel.com>
Subject: RE: [PATCH 1/1] MdeModulePkg/XhciDxe: Reset endpoint while = USB Transaction error
 

@Ni, Ray @Liming GaoWould you like to merge the patch to upstream?<= /p>

 

Thanks,

Xianglei

 

From: Lewandowski, Krzysztof <krzysztof.= lewandowski@intel.com>
Sent: Thursday, April 11, 2024 9:45 PM
To: devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Liming Gao <gaoliming@byoso= ft.com.cn>; Huang, Jenny <jenny.huang@intel.com>; Shih, More <m= ore.shih@intel.com>; Cai, Xianglei <xianglei.cai@intel.com>
Subject: Re: [PATCH 1/1] MdeModulePkg/XhciDxe: Reset endpoint while = USB Transaction error

 

Looks good to me.

Reviewed-by: Krzysztof Lewandowski <krzysztof.lewandowski@intel.com>


From: Cai, Xianglei <xianglei.cai@intel.com>
Sent: Wednesday, April 10, 2024 09:02
To: devel@edk2.groups.io= <devel@edk2.groups.io> Cc: Cai, Xianglei <xian= glei.cai@intel.com>; Ni, Ray <ray.ni@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Lewandowski, Krzysztof <krzysztof= .lewandowski@intel.com>; Huang, Jenny <jenny.huang@intel.com>; Shih, More <more.shih@intel.com>
Subject: [PATCH 1/1] MdeModulePkg/XhciDxe: Reset endpoint while USB = Transaction error

 

https://bugzilla.tianocore.o= rg/show_bug.cgi?id=3D4556

Based on XHCI spec 4.8.3, software should do the
reset endpoint while USB Transaction occur.
Also add the error code for USB Transaction error
since UEFI spec don't have the related definition.

Cc: Ray Ni           = ;            &n= bsp;        <ray.ni@intel.com>
Cc: Liming Gao          &= nbsp;           &nbs= p;     <= gaoliming@byosoft.com.cn>
Cc: Krzysztof Lewandowski    <krzysztof.lewandowski@intel.com>
Cc: Jenny Huang          =             &nb= sp;    <jenny.hu= ang@intel.com>
Cc: More Shih          &n= bsp;            = ;      <= more.shih@intel.com>

Signed-off-by: Xianglei Cai <x= ianglei.cai@intel.com>
---
 MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c      |&n= bsp; 2 +-
 MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c |  2 +-
 MdePkg/Include/Protocol/UsbIo.h      &n= bsp;   | 21 +++++++++++----------
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/Xhc= iDxe/Xhci.c
index f4e61d223c1b..63cc29b26536 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
@@ -825,7 +825,7 @@ XhcTransfer (
   *TransferResult =3D Urb->Result;
   *DataLength     =3D Urb->Completed;
 
-  if ((*TransferResult =3D=3D EFI_USB_ERR_STALL) || (*TransferResult = =3D=3D EFI_USB_ERR_BABBLE)) {
+  if ((*TransferResult =3D=3D EFI_USB_ERR_STALL) || (*TransferResult = =3D=3D EFI_USB_ERR_BABBLE) || (*TransferResult =3D=3D EFI_USB_ERR_TRANSACTI= ON)) {
     ASSERT (Status =3D=3D EFI_DEVICE_ERROR);
     RecoveryStatus =3D XhcRecoverHaltedEndpoint (Xhc, = Urb);
     if (EFI_ERROR (RecoveryStatus)) {
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pc= i/XhciDxe/XhciSched.c
index 05528a478baf..e77852f62f10 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
@@ -1193,7 +1193,7 @@ XhcCheckUrbResult (
         goto EXIT;
 
       case TRB_COMPLETION_USB_TRANSACTION_ER= ROR:
-        CheckedUrb->Result  |= =3D EFI_USB_ERR_TIMEOUT;
+        CheckedUrb->Result  |= =3D EFI_USB_ERR_TRANSACTION;
         CheckedUrb->Finished = =3D TRUE;
         DEBUG ((DEBUG_ERROR, "= ;XhcCheckUrbResult: TRANSACTION_ERROR! Completecode =3D %x\n", EvtTrb-= >Completecode));
         goto EXIT;
diff --git a/MdePkg/Include/Protocol/UsbIo.h b/MdePkg/Include/Protocol/UsbI= o.h
index a780b4e07b44..211ef0c94156 100644
--- a/MdePkg/Include/Protocol/UsbIo.h
+++ b/MdePkg/Include/Protocol/UsbIo.h
@@ -50,16 +50,17 @@ typedef enum {
 //
 // USB Transfer Results
 //
-#define EFI_USB_NOERROR         0x= 00
-#define EFI_USB_ERR_NOTEXECUTE  0x01
-#define EFI_USB_ERR_STALL       0x02
-#define EFI_USB_ERR_BUFFER      0x04
-#define EFI_USB_ERR_BABBLE      0x08
-#define EFI_USB_ERR_NAK         0x= 10
-#define EFI_USB_ERR_CRC         0x= 20
-#define EFI_USB_ERR_TIMEOUT     0x40
-#define EFI_USB_ERR_BITSTUFF    0x80
-#define EFI_USB_ERR_SYSTEM      0x100
+#define EFI_USB_NOERROR        &nb= sp; 0x00
+#define EFI_USB_ERR_NOTEXECUTE   0x01
+#define EFI_USB_ERR_STALL        0x02 +#define EFI_USB_ERR_BUFFER       0x04
+#define EFI_USB_ERR_BABBLE       0x08
+#define EFI_USB_ERR_NAK        &nb= sp; 0x10
+#define EFI_USB_ERR_CRC        &nb= sp; 0x20
+#define EFI_USB_ERR_TIMEOUT      0x40
+#define EFI_USB_ERR_BITSTUFF     0x80
+#define EFI_USB_ERR_SYSTEM       0x100
+#define EFI_USB_ERR_TRANSACTION  0x200
 
 /**
   Async USB transfer callback routine.
--
2.42.0.windows.2

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#117745) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB82444FAE2CF0E3E39B6596C88C092MN6PR11MB8244namp_--