From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"zhoucheng@phytium.com.cn" <zhoucheng@phytium.com.cn>
Cc: Pedro Falcato <pedro.falcato@gmail.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg:Add Warm Reset for Xhc
Date: Wed, 16 Nov 2022 06:55:30 +0000 [thread overview]
Message-ID: <DM6PR11MB402540EF93068EB130F3BA4FCA079@DM6PR11MB4025.namprd11.prod.outlook.com> (raw)
In-Reply-To: <4722.1667531735089236658@groups.io>
[-- Attachment #1.1: Type: text/plain, Size: 2538 bytes --]
Really sorry for the delayed response. I have some questions.
Could you help to provide more information on the issue met that leads to this proposed code change? Also, what tests have been performed for the patch?
The XHCI spec mentions that WPR (bit31 in PORTSC register) only applies to USB3 protocol ports.
Does the “PLS == 6” check ensure the port supports USB3 protocol or additional checks (Port Speed field in PORTSC register + xHCI Supported Protocol Capability) should be added before issuing a Warm Reset?
The proposed code change adds “a eSS.Inactive check and performs a Warm Reset if the check satisfies” after a Hot Reset attempt.
Does the Hot Reset attempt required to resolve the issue? How about the below flow:
if eSS.Inactive
Warm Reset (WPR=1 in PORTSC)
else
Hot Reset (PR=1 in PORTSC)
Best Regards,
Hao Wu
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of zhoucheng
Sent: Friday, November 4, 2022 11:16 AM
To: Pedro Falcato <pedro.falcato@gmail.com>; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg:Add Warm Reset for Xhc
Hi Pedro:
// The description here is the judgment state,we can watch to XHC PORTSC register.
// according to Xhc Spec 5.4.8 chapter Table39.we can knowleadge more information.
// We need to pay attention to the PED CCS and PLS bits of the PORTSC register.
+ State = XhcReadOpReg (Xhc, Offset);
+ if ((((State & 0x1e0) >> 5) == 6) && ((State & 3) == 0)) {
↓ ↓
PLS bit PED and CCS bit
// PLS: Port Link State PED: Port Enabled/Disabled CCS: Current Connect Status
// If the CCS bit and PED are 0, the device is disconnected and the port is not enabled.
// If PLS is 6, the controller state machine is abnormal and software intervention is required.
[cid:image001.png@01D8F9C8.94D8C800]
// According to Usb3.2 spec 7.5.2 chapter.Inactive is a state where a link has failed Enhanced SuperSpeed operation.
// The software is required to perform a warm reset operation.
// Therefore, according to the Xhc1.1 spec 5.8 chapter Table39, we can write 1 to its highest bit and perform a hot reset operation to restore the controller.
[cid:image002.png@01D8F9C8.94D8C800]
+ State |= 0x80000000;
For the value of this block, the above explanation has been made, and the discussion can be continued at the same time.
Thanks!
[-- Attachment #1.2: Type: text/html, Size: 6508 bytes --]
[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 38497 bytes --]
[-- Attachment #3: image002.png --]
[-- Type: image/png, Size: 70313 bytes --]
next prev parent reply other threads:[~2022-11-16 6:55 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 [this message]
2022-11-16 11:36 ` zhoucheng
2022-11-17 1:48 ` Wu, Hao A
2022-11-17 10:23 ` zhoucheng
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=DM6PR11MB402540EF93068EB130F3BA4FCA079@DM6PR11MB4025.namprd11.prod.outlook.com \
--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