From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 5C528AC0E93 for ; Fri, 26 Apr 2024 08:44:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=tDGGksOdeCGH15IavySIm6x4wcbltQB/C94qH5GADNs=; 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=1714121066; v=1; b=EBVlv9QT30d1JesJ2mtworyEnRV3QvftSaGxdmISkKWYds6txmj8KAd3qcEGpTFY+9nODgzR YDAWMdc36fFDoIxzD/0hpMJMeT41Spd03AiHb614WZnSnbFaLej2TzN0jZQnkuLPD9XzjXPDeVm GKV/Ak5szJsD45iicuYryVoF6WTAZWUeIU0G0kEaYA0fiNXxB+efU45uuSxJZR6an3h+2ZU3nba XbcTLQ/N91i5pHK6M6ZPhka2BJkB9gTU2NCtbdTaYUaQBN/VT8c8WgCdcZEkjigkIEpSIjsA+ui KrN0nhn794DJECyI57jN2JPoAkPGN+qaBa957Ia8tP3qA== X-Received: by 127.0.0.2 with SMTP id 98AfYY7687511x3EphYfPI4p; Fri, 26 Apr 2024 01:44:26 -0700 X-Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web11.9309.1714121065396635334 for ; Fri, 26 Apr 2024 01:44:26 -0700 X-Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 6BD1CDDA7C4 for ; Fri, 26 Apr 2024 16:44:20 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 672D4DDA7A3 for ; Fri, 26 Apr 2024 16:44:20 +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 83062DDA795 for ; Fri, 26 Apr 2024 16:44:14 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Fri, 26 Apr 2024 16:44:09 +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: "'Ni, Ray'" , "'Lewandowski, Krzysztof'" , "'Huang, Jenny'" , "'Shih, More'" References: <23b74af38dddeff43d19da4e6de82ed1ae7b4ed8.1713164057.git.xianglei.cai@intel.com> <01dd01da8f1a$8eb0bd00$ac123700$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIFYyIDEvMV0gTWRlTW9kdWxlUGtnL1hoY2lEeGU6IFJlc2V0IGVuZHBvaW50IHdoaWxlIFVTQiBUcmFuc2FjdGlvbiBlcnJvcg==?= Date: Fri, 26 Apr 2024 16:44:13 +0800 Message-ID: <021001da97b5$ea6f04f0$bf4d0ed0$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQJw/gOq2/7eq0WBWVaWK72V6LPrpQF82+UCAisyoWoBuBYk6gKbU2BYsA2T5SA= 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: Fri, 26 Apr 2024 01:44:26 -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: UhUIOUSBl6We47PnvQ86tEG6x7686176AA= Content-Type: text/plain; charset="utf-8" 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=EBVlv9QT; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Can you create PR for this patch? If it passes CI, I will add push label.= =20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Xianglei Cai > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B44=E6=9C=8825=E6=97=A5 = 17:58 > =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming ; devel@= edk2.groups.io > =E6=8A=84=E9=80=81: Ni, Ray ; Lewandowski, Krzysztof > ; Huang, Jenny ; > Shih, More > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH V2 1/1] MdeModulePkg/XhciDxe:= Reset > endpoint while USB Transaction error >=20 > Hi @gaoliming >=20 > Could you provide the eta when the patch can be merged? >=20 > Thanks, > Xianglei >=20 > -----Original Message----- > From: Cai, Xianglei > Sent: Thursday, April 18, 2024 4:59 PM > To: gaoliming ; devel@edk2.groups.io > Cc: Ni, Ray ; Lewandowski, Krzysztof > ; Huang, Jenny ; > Shih, More > Subject: RE: [edk2-devel] [PATCH V2 1/1] MdeModulePkg/XhciDxe: Reset > endpoint while USB Transaction error >=20 > Hi Liming, >=20 > Could you help pick the change to the master branch? >=20 > Thanks, > Xianglei >=20 > -----Original Message----- > From: gaoliming > Sent: Monday, April 15, 2024 5:52 PM > To: devel@edk2.groups.io; Cai, Xianglei > Cc: Ni, Ray ; Lewandowski, Krzysztof > ; Huang, Jenny ; > Shih, More > Subject: =E5=9B=9E=E5=A4=8D: [edk2-devel] [PATCH V2 1/1] MdeModulePkg/Xhc= iDxe: Reset > endpoint while USB Transaction error >=20 > Reviewed-by: Liming Gao >=20 > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =E4=BB=A3=E8=A1=A8 Xianglei > Cai > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B44=E6=9C=8815=E6=97= =A5 14:55 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > > =E6=8A=84=E9=80=81: Xianglei Cai ; Ray Ni ; > > Liming Gao ; Krzysztof Lewandowski > > ; Jenny Huang > > ; More Shih > > =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH V2 1/1] MdeModulePkg/XhciDxe: R= eset > endpoint > > while USB Transaction 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. > > 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 > > 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(-) > > > > 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; > > > > - 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; > > > > + // > > + // 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 > > > > +// > > +// 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 >=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 (#118320): https://edk2.groups.io/g/devel/message/118320 Mute This Topic: https://groups.io/mt/105746896/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-