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 F0D5ED8106C for ; Mon, 15 Apr 2024 09:52:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=4c7vwpxezxfQen7b6NlMq5jCQbweOWWkcRbZ9qfPf+s=; c=relaxed/simple; d=groups.io; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding:Content-Language; s=20240206; t=1713174726; v=1; b=D2kb1GhT9FopUnusdsVl4SgJF0UPcy6HXF1m+UMkl02MpWK6q602hjn26CQak5bfxQCIwjat JudC4giDKvJw8/8hOZ7r961ddtFrKhh6nGCmuHQxdsYzIA6QOaCYcQ1cHbuHUZ+F2JMwnwAbiqi NGtAZThs/TLJ5lyR1WWR/f6jfmafCgACrdWWBEbPoF6qUE8YS1txvBsvybNaFiLF6uaI3AOUS9c ZeUBjWZap46LA/qrv/w1w1G7FB4dnIE47mRNRlIonR7lGN6n0mhpGPtzzVJyVLcEewD0BofTBng eZtTRIOMb+sWdhFMvfUnP5lw8s4WvQgs08WnrIa9bmNUA== X-Received: by 127.0.0.2 with SMTP id wcvFYY7687511xjJ683Eiue6; Mon, 15 Apr 2024 02:52:06 -0700 X-Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web10.17023.1713174724871964209 for ; Mon, 15 Apr 2024 02:52:05 -0700 X-Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 9C8DFDDA7E0 for ; Mon, 15 Apr 2024 17:52:02 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 97F91DDA7DC for ; Mon, 15 Apr 2024 17:52:02 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by cxsh.intel-email.com (Postfix) with SMTP id BCF0FDDA7E8 for ; Mon, 15 Apr 2024 17:51:58 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Mon, 15 Apr 2024 17:51:56 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: , Cc: "'Ray Ni'" , "'Krzysztof Lewandowski'" , "'Jenny Huang'" , "'More Shih'" References: <23b74af38dddeff43d19da4e6de82ed1ae7b4ed8.1713164057.git.xianglei.cai@intel.com> In-Reply-To: <23b74af38dddeff43d19da4e6de82ed1ae7b4ed8.1713164057.git.xianglei.cai@intel.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIFYyIDEvMV0gTWRlTW9kdWxlUGtnL1hoY2lEeGU6IFJlc2V0IGVuZHBvaW50IHdoaWxlIFVTQiBUcmFuc2FjdGlvbiBlcnJvcg==?= Date: Mon, 15 Apr 2024 17:51:58 +0800 Message-ID: <01dd01da8f1a$8eb0bd00$ac123700$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQJw/gOq2/7eq0WBWVaWK72V6LPrpQF82+UCsDBSJVA= 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: Mon, 15 Apr 2024 02:52:05 -0700 Resent-From: gaoliming@byosoft.com.cn Reply-To: devel@edk2.groups.io,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 9R4IYDLUFewwA1gCL2qzddZhx7686176AA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=D2kb1GhT; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.9 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=pass (policy=none) header.from=groups.io Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED Xianglei Cai > =B7=A2=CB=CD=CA=B1=BC=E4: 2024=C4=EA4=D4=C215=C8=D5 14:55 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Xianglei Cai ; Ray Ni ; > Liming Gao ; Krzysztof Lewandowski > ; Jenny Huang ; > More Shih > =D6=F7=CC=E2: [edk2-devel] [PATCH V2 1/1] MdeModulePkg/XhciDxe: Reset end= point > while USB Transaction error >=20 > https://bugzilla.tianocore.org/show_bug.cgi?id=3D4556 >=20 > Based on XHCI spec 4.8.3, software should do the > reset endpoint while USB Transaction occur. > Add the error code for USB Transaction error > since UEFI spec don't have the related definition. >=20 > Cc: Ray Ni > Cc: Liming Gao > Cc: Krzysztof Lewandowski > Cc: Jenny Huang > Cc: More Shih > Signed-off-by: Xianglei Cai > Reviewed-by: Krzysztof Lewandowski > --- > MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 5 ++++- > MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 5 ++++- > MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.h | 7 +++++++ > 3 files changed, 15 insertions(+), 2 deletions(-) >=20 > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > index f4e61d223c1b..cf6b32959e68 100644 > --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > @@ -825,7 +825,10 @@ XhcTransfer ( > *TransferResult =3D Urb->Result; > *DataLength =3D Urb->Completed; >=20 > - if ((*TransferResult =3D=3D EFI_USB_ERR_STALL) || (*TransferResult =3D= =3D > EFI_USB_ERR_BABBLE)) { > + // > + // Based on XHCI spec 4.8.3, software should do the reset endpoint while > USB Transaction occur. > + // > + if ((*TransferResult =3D=3D EFI_USB_ERR_STALL) || (*TransferResult =3D= =3D > EFI_USB_ERR_BABBLE) || (*TransferResult =3D=3D > EDKII_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/Pci/XhciDxe/XhciSched.c > index 5d735008ba31..a97ed44dbfc3 100644 > --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c > @@ -1192,8 +1192,11 @@ XhcCheckUrbResult ( > DEBUG ((DEBUG_ERROR, "XhcCheckUrbResult: ERR_BUFFER! > Completecode =3D %x\n", EvtTrb->Completecode)); > goto EXIT; >=20 > + // > + // Based on XHCI spec 4.8.3, software should do the reset endpoint > while USB Transaction occur. > + // > case TRB_COMPLETION_USB_TRANSACTION_ERROR: > - CheckedUrb->Result |=3D EFI_USB_ERR_TIMEOUT; > + CheckedUrb->Result |=3D EDKII_USB_ERR_TRANSACTION; > CheckedUrb->Finished =3D TRUE; > DEBUG ((DEBUG_ERROR, "XhcCheckUrbResult: > TRANSACTION_ERROR! Completecode =3D %x\n", EvtTrb->Completecode)); > goto EXIT; > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.h > b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.h > index 7c85f7993b5c..e606e212a1d3 100644 > --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.h > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.h > @@ -78,6 +78,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #define TRB_COMPLETION_STOPPED 26 > #define TRB_COMPLETION_STOPPED_LENGTH_INVALID 27 >=20 > +// > +// USB Transfer Results Internal Definition > +// Based on XHCI spec 4.8.3, software should do the reset endpoint while > USB Transaction occur. > +// Add the error code for USB Transaction error since UEFI spec don't have > the related definition. > +// > +#define EDKII_USB_ERR_TRANSACTION 0x200 > + > // > // The topology string used to present usb device location > // > -- > 2.42.0.windows.2 >=20 >=20 >=20 >=20 >=20 -=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 (#117771): https://edk2.groups.io/g/devel/message/117771 Mute This Topic: https://groups.io/mt/105532714/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-