From: "zhoucheng" <zhoucheng@phytium.com.cn>
To: Wu, Hao A <hao.a.wu@intel.com>,devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg:Add Warm Reset for Xhc
Date: Thu, 17 Nov 2022 02:23:13 -0800 [thread overview]
Message-ID: <23800.1668680593584775353@groups.io> (raw)
In-Reply-To: <DM6PR11MB40255075E08C4EE7EEE5C767CA069@DM6PR11MB4025.namprd11.prod.outlook.com>
[-- Attachment #1.1: Type: text/plain, Size: 1096 bytes --]
HI Hao Wu:
This exception is executed
Therefore, the modifications provided may not be applicable. Resetting a Root Hub Port cause the exception.
Although the probability is not high.So I think it still needs to be placed after the Root Hub prot reset.
//
// 4.3.1 Resetting a Root Hub Port
// 1) Write the PORTSC register with the Port Reset (PR) bit set to '1'.
//
State |= XHC_PORTSC_RESET;
XhcWriteOpReg (Xhc, Offset, State);
XhcWaitOpRegBit (Xhc, Offset, XHC_PORTSC_PRC, TRUE, XHC_GENERIC_TIMEOUT);
if ((((State & 0x1e0) >> 5) == 6) && ((State & 3) == 0)) {
//
// Usb 3.2 spec 7.5.2
// When the USB state machine is Inactive state, the device is abnormal.
// eSS.Inactive is a state where a link has failed Enhanced SuperSpeed operation.Software
// is required for warm reset intervention.This flag only applies to USB3 protocol ports.
//
State |= 0x80000000;
XhcWriteOpReg (Xhc, Offset, State);
XhcWaitOpRegBit (Xhc, Offset, XHC_PORTSC_PRC, TRUE, XHC_GENERIC_TIMEOUT);
DEBUG ((DEBUG_INFO, "Warm Reset Successful! \n"));
}
break;
Best Regards
Thanks!
[-- Attachment #1.2: Type: text/html, Size: 1753 bytes --]
[-- Attachment #2: dummyfile.0.part --]
[-- Type: image/png, Size: 40633 bytes --]
prev parent reply other threads:[~2022-11-17 10:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 15:53 [PATCH v1 0/1] MdeModulePkg:Add Warm Reset for Xhc zhoucheng
2022-11-03 15:53 ` [PATCH v1 1/1] " zhoucheng
2022-11-03 18:28 ` [edk2-devel] " Pedro Falcato
2022-11-04 3:15 ` zhoucheng
2022-11-16 6:55 ` Wu, Hao A
2022-11-16 11:36 ` zhoucheng
2022-11-17 1:48 ` Wu, Hao A
2022-11-17 10:23 ` zhoucheng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23800.1668680593584775353@groups.io \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox