2024-06-04 06:07:33

by Krishna Kurapati PSSNV

[permalink] [raw]
Subject: [PATCH v2 0/2] Disable SS instances in park mode for SC7180/ SC7280

When working in host mode, in certain conditions, when the USB
host controller is stressed, there is a HC died warning that comes up.
Fix this up by disabling SS instances in park mode for SC7280 and SC7180.

It is recommended to set this quirk for all Gen-1 SoCs. Will identify the
other SoCs and push a separate series for the same.

Changes in v2:
Updated commit text to include error message as well.
Minor other nits in commit text fixed.

Link to v1:
https://lore.kernel.org/all/[email protected]/

Krishna Kurapati (2):
arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode
arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode

arch/arm64/boot/dts/qcom/sc7180.dtsi | 1 +
arch/arm64/boot/dts/qcom/sc7280.dtsi | 1 +
2 files changed, 2 insertions(+)

--
2.34.1



2024-06-04 06:07:50

by Krishna Kurapati PSSNV

[permalink] [raw]
Subject: [PATCH v2 1/2] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode

On SC7180, in host mode, it is observed that stressing out controller
results in HC died error:

xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up

And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7180 to mitigate this issue.

Reported-by: Doug Anderson <[email protected]>
Cc: <[email protected]>
Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes")
Signed-off-by: Krishna Kurapati <[email protected]>
---
Removed RB/TB tag from Doug as commit text was updated.

arch/arm64/boot/dts/qcom/sc7180.dtsi | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 2b481e20ae38..cc93b5675d5d 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -3063,6 +3063,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0x540 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
--
2.34.1


2024-06-04 06:08:16

by Krishna Kurapati PSSNV

[permalink] [raw]
Subject: [PATCH v2 2/2] arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode

On SC7280, in host mode, it is observed that stressing out controller
results in HC died error:

xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up

And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7280 to mitigate this issue.

Reported-by: Doug Anderson <[email protected]>
Cc: <[email protected]>
Fixes: bb9efa59c665 ("arm64: dts: qcom: sc7280: Add USB related nodes")
Signed-off-by: Krishna Kurapati <[email protected]>
---
Removed RB/TB tag from Doug as commit text was updated.

arch/arm64/boot/dts/qcom/sc7280.dtsi | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 41f51d326111..e0d3eeb6f639 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -4131,6 +4131,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0xe0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
--
2.34.1


2024-06-04 07:47:36

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode

On Tue, Jun 04, 2024 at 11:36:58AM +0530, Krishna Kurapati wrote:
> On SC7180, in host mode, it is observed that stressing out controller
> results in HC died error:
>
> xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
> xhci-hcd.12.auto: xHCI host controller not responding, assume dead
> xhci-hcd.12.auto: HC died; cleaning up
>
> And at this instant only restarting the host mode fixes it. Disable
> SuperSpeed instances in park mode for SC7180 to mitigate this issue.

Let me please repeat the question from v1:

Just out of curiosity, what is the park mode?

>
> Reported-by: Doug Anderson <[email protected]>
> Cc: <[email protected]>
> Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes")
> Signed-off-by: Krishna Kurapati <[email protected]>
> ---
> Removed RB/TB tag from Doug as commit text was updated.
>
> arch/arm64/boot/dts/qcom/sc7180.dtsi | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index 2b481e20ae38..cc93b5675d5d 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -3063,6 +3063,7 @@ usb_1_dwc3: usb@a600000 {
> iommus = <&apps_smmu 0x540 0>;
> snps,dis_u2_susphy_quirk;
> snps,dis_enblslpm_quirk;
> + snps,parkmode-disable-ss-quirk;
> phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
> phy-names = "usb2-phy", "usb3-phy";
> maximum-speed = "super-speed";
> --
> 2.34.1
>

--
With best wishes
Dmitry

2024-06-04 08:05:19

by Krishna Kurapati PSSNV

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode



On 6/4/2024 1:16 PM, Dmitry Baryshkov wrote:
> On Tue, Jun 04, 2024 at 11:36:58AM +0530, Krishna Kurapati wrote:
>> On SC7180, in host mode, it is observed that stressing out controller
>> results in HC died error:
>>
>> xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
>> xhci-hcd.12.auto: xHCI host controller not responding, assume dead
>> xhci-hcd.12.auto: HC died; cleaning up
>>
>> And at this instant only restarting the host mode fixes it. Disable
>> SuperSpeed instances in park mode for SC7180 to mitigate this issue.
>
> Let me please repeat the question from v1:
>
> Just out of curiosity, what is the park mode?
>

Sorry, Missed the mail in v1.

Databook doesn't give much info on this bit (SS case, commit
7ba6b09fda5e0) but it does in HS case (commit d21a797a3eeb2).

From the mail we received from Synopsys, they described it as follows:

"Park mode feature allows better throughput on the USB in cases where a
single EP is active. It increases the degree of pipelining within the
controller as long as a single EP is active."

Even in the current debug for this test case, Synopsys suggested us to
set this bit to avoid the controller being dead and we are waiting for
further answers from them.

I can update thread with more info once we get some data from Synopsys.

Regards,
Krishna,

>>
>> Reported-by: Doug Anderson <[email protected]>
>> Cc: <[email protected]>
>> Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes")
>> Signed-off-by: Krishna Kurapati <[email protected]>
>> ---
>> Removed RB/TB tag from Doug as commit text was updated.
>>
>> arch/arm64/boot/dts/qcom/sc7180.dtsi | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> index 2b481e20ae38..cc93b5675d5d 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> @@ -3063,6 +3063,7 @@ usb_1_dwc3: usb@a600000 {
>> iommus = <&apps_smmu 0x540 0>;
>> snps,dis_u2_susphy_quirk;
>> snps,dis_enblslpm_quirk;
>> + snps,parkmode-disable-ss-quirk;
>> phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
>> phy-names = "usb2-phy", "usb3-phy";
>> maximum-speed = "super-speed";
>> --
>> 2.34.1
>>
>

2024-06-04 09:47:19

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode

On Tue, Jun 04, 2024 at 01:34:44PM +0530, Krishna Kurapati PSSNV wrote:
>
>
> On 6/4/2024 1:16 PM, Dmitry Baryshkov wrote:
> > On Tue, Jun 04, 2024 at 11:36:58AM +0530, Krishna Kurapati wrote:
> > > On SC7180, in host mode, it is observed that stressing out controller
> > > results in HC died error:
> > >
> > > xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
> > > xhci-hcd.12.auto: xHCI host controller not responding, assume dead
> > > xhci-hcd.12.auto: HC died; cleaning up
> > >
> > > And at this instant only restarting the host mode fixes it. Disable
> > > SuperSpeed instances in park mode for SC7180 to mitigate this issue.
> >
> > Let me please repeat the question from v1:
> >
> > Just out of curiosity, what is the park mode?
> >
>
> Sorry, Missed the mail in v1.
>
> Databook doesn't give much info on this bit (SS case, commit 7ba6b09fda5e0)
> but it does in HS case (commit d21a797a3eeb2).
>
> From the mail we received from Synopsys, they described it as follows:
>
> "Park mode feature allows better throughput on the USB in cases where a
> single EP is active. It increases the degree of pipelining within the
> controller as long as a single EP is active."

Thank you!

>
> Even in the current debug for this test case, Synopsys suggested us to set
> this bit to avoid the controller being dead and we are waiting for further
> answers from them.

Should these quirks be enabled for other Qualcomm platforms? If so,
which platforms should get it?

> I can update thread with more info once we get some data from Synopsys.
>
> Regards,
> Krishna,
>
> > >
> > > Reported-by: Doug Anderson <[email protected]>
> > > Cc: <[email protected]>
> > > Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes")
> > > Signed-off-by: Krishna Kurapati <[email protected]>
> > > ---
> > > Removed RB/TB tag from Doug as commit text was updated.
> > >
> > > arch/arm64/boot/dts/qcom/sc7180.dtsi | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > index 2b481e20ae38..cc93b5675d5d 100644
> > > --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> > > @@ -3063,6 +3063,7 @@ usb_1_dwc3: usb@a600000 {
> > > iommus = <&apps_smmu 0x540 0>;
> > > snps,dis_u2_susphy_quirk;
> > > snps,dis_enblslpm_quirk;
> > > + snps,parkmode-disable-ss-quirk;
> > > phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
> > > phy-names = "usb2-phy", "usb3-phy";
> > > maximum-speed = "super-speed";
> > > --
> > > 2.34.1
> > >
> >

--
With best wishes
Dmitry

2024-06-04 09:58:22

by Krishna Kurapati PSSNV

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode



On 6/4/2024 3:16 PM, Dmitry Baryshkov wrote:
> On Tue, Jun 04, 2024 at 01:34:44PM +0530, Krishna Kurapati PSSNV wrote:
>>
>>
>> On 6/4/2024 1:16 PM, Dmitry Baryshkov wrote:
>>> On Tue, Jun 04, 2024 at 11:36:58AM +0530, Krishna Kurapati wrote:
>>>> On SC7180, in host mode, it is observed that stressing out controller
>>>> results in HC died error:
>>>>
>>>> xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
>>>> xhci-hcd.12.auto: xHCI host controller not responding, assume dead
>>>> xhci-hcd.12.auto: HC died; cleaning up
>>>>
>>>> And at this instant only restarting the host mode fixes it. Disable
>>>> SuperSpeed instances in park mode for SC7180 to mitigate this issue.
>>>
>>> Let me please repeat the question from v1:
>>>
>>> Just out of curiosity, what is the park mode?
>>>
>>
>> Sorry, Missed the mail in v1.
>>
>> Databook doesn't give much info on this bit (SS case, commit 7ba6b09fda5e0)
>> but it does in HS case (commit d21a797a3eeb2).
>>
>> From the mail we received from Synopsys, they described it as follows:
>>
>> "Park mode feature allows better throughput on the USB in cases where a
>> single EP is active. It increases the degree of pipelining within the
>> controller as long as a single EP is active."
>
> Thank you!
>
>>
>> Even in the current debug for this test case, Synopsys suggested us to set
>> this bit to avoid the controller being dead and we are waiting for further
>> answers from them.
>
> Should these quirks be enabled for other Qualcomm platforms? If so,
> which platforms should get it?

In downstream we enable this for Gen-1 platforms. On v1 discussion
thread, I agreed to send another series for other platforms.

I could've included it for others as well in this v2, but there are
around 30 QC SoCs (or more) on upstream and many are very old. I need to
go through all of them and figure out which ones are Gen-1. To not delay
this for SC7280 and SC7180 (as chrome platforms need it right away), I
sent v2 only for these two targets.

Regards,
Krishna,

>
>> I can update thread with more info once we get some data from Synopsys.
>>
>> Regards,
>> Krishna,
>>
>>>>
>>>> Reported-by: Doug Anderson <[email protected]>
>>>> Cc: <[email protected]>
>>>> Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes")
>>>> Signed-off-by: Krishna Kurapati <[email protected]>
>>>> ---
>>>> Removed RB/TB tag from Doug as commit text was updated.
>>>>
>>>> arch/arm64/boot/dts/qcom/sc7180.dtsi | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>>>> index 2b481e20ae38..cc93b5675d5d 100644
>>>> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
>>>> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>>>> @@ -3063,6 +3063,7 @@ usb_1_dwc3: usb@a600000 {
>>>> iommus = <&apps_smmu 0x540 0>;
>>>> snps,dis_u2_susphy_quirk;
>>>> snps,dis_enblslpm_quirk;
>>>> + snps,parkmode-disable-ss-quirk;
>>>> phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
>>>> phy-names = "usb2-phy", "usb3-phy";
>>>> maximum-speed = "super-speed";
>>>> --
>>>> 2.34.1
>>>>
>>>
>

2024-06-04 10:05:59

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode

On Tue, 4 Jun 2024 at 12:58, Krishna Kurapati PSSNV
<[email protected]> wrote:
>
>
>
> On 6/4/2024 3:16 PM, Dmitry Baryshkov wrote:
> > On Tue, Jun 04, 2024 at 01:34:44PM +0530, Krishna Kurapati PSSNV wrote:
> >>
> >>
> >> On 6/4/2024 1:16 PM, Dmitry Baryshkov wrote:
> >>> On Tue, Jun 04, 2024 at 11:36:58AM +0530, Krishna Kurapati wrote:
> >>>> On SC7180, in host mode, it is observed that stressing out controller
> >>>> results in HC died error:
> >>>>
> >>>> xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
> >>>> xhci-hcd.12.auto: xHCI host controller not responding, assume dead
> >>>> xhci-hcd.12.auto: HC died; cleaning up
> >>>>
> >>>> And at this instant only restarting the host mode fixes it. Disable
> >>>> SuperSpeed instances in park mode for SC7180 to mitigate this issue.
> >>>
> >>> Let me please repeat the question from v1:
> >>>
> >>> Just out of curiosity, what is the park mode?
> >>>
> >>
> >> Sorry, Missed the mail in v1.
> >>
> >> Databook doesn't give much info on this bit (SS case, commit 7ba6b09fda5e0)
> >> but it does in HS case (commit d21a797a3eeb2).
> >>
> >> From the mail we received from Synopsys, they described it as follows:
> >>
> >> "Park mode feature allows better throughput on the USB in cases where a
> >> single EP is active. It increases the degree of pipelining within the
> >> controller as long as a single EP is active."
> >
> > Thank you!
> >
> >>
> >> Even in the current debug for this test case, Synopsys suggested us to set
> >> this bit to avoid the controller being dead and we are waiting for further
> >> answers from them.
> >
> > Should these quirks be enabled for other Qualcomm platforms? If so,
> > which platforms should get it?
>
> In downstream we enable this for Gen-1 platforms. On v1 discussion
> thread, I agreed to send another series for other platforms.
>
> I could've included it for others as well in this v2, but there are
> around 30 QC SoCs (or more) on upstream and many are very old. I need to
> go through all of them and figure out which ones are Gen-1. To not delay
> this for SC7280 and SC7180 (as chrome platforms need it right away), I
> sent v2 only for these two targets.

Ack, this is fine from my point of view. Thank you!

>
> Regards,
> Krishna,
>
> >
> >> I can update thread with more info once we get some data from Synopsys.


--
With best wishes
Dmitry

2024-06-04 11:45:45

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] Disable SS instances in park mode for SC7180/ SC7280



On 6/4/24 08:06, Krishna Kurapati wrote:
> When working in host mode, in certain conditions, when the USB
> host controller is stressed, there is a HC died warning that comes up.
> Fix this up by disabling SS instances in park mode for SC7280 and SC7180.
>
> It is recommended to set this quirk for all Gen-1 SoCs. Will identify the
> other SoCs and push a separate series for the same.

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad

2024-06-04 14:34:34

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode

Hi,

On Mon, Jun 3, 2024 at 11:07 PM Krishna Kurapati
<[email protected]> wrote:
>
> On SC7280, in host mode, it is observed that stressing out controller
> results in HC died error:
>
> xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
> xhci-hcd.12.auto: xHCI host controller not responding, assume dead
> xhci-hcd.12.auto: HC died; cleaning up
>
> And at this instant only restarting the host mode fixes it. Disable
> SuperSpeed instances in park mode for SC7280 to mitigate this issue.
>
> Reported-by: Doug Anderson <[email protected]>
> Cc: <[email protected]>
> Fixes: bb9efa59c665 ("arm64: dts: qcom: sc7280: Add USB related nodes")
> Signed-off-by: Krishna Kurapati <[email protected]>
> ---
> Removed RB/TB tag from Doug as commit text was updated.
>
> arch/arm64/boot/dts/qcom/sc7280.dtsi | 1 +
> 1 file changed, 1 insertion(+)

Reviewed-by: Douglas Anderson <[email protected]>

2024-06-04 14:55:11

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode

Hi,

On Mon, Jun 3, 2024 at 11:07 PM Krishna Kurapati
<[email protected]> wrote:
>
> On SC7180, in host mode, it is observed that stressing out controller
> results in HC died error:
>
> xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
> xhci-hcd.12.auto: xHCI host controller not responding, assume dead
> xhci-hcd.12.auto: HC died; cleaning up
>
> And at this instant only restarting the host mode fixes it. Disable
> SuperSpeed instances in park mode for SC7180 to mitigate this issue.
>
> Reported-by: Doug Anderson <[email protected]>
> Cc: <[email protected]>
> Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes")
> Signed-off-by: Krishna Kurapati <[email protected]>
> ---
> Removed RB/TB tag from Doug as commit text was updated.

It was a minor change so you could have kept my tags (especially the
Tested-by, which isn't affected by the commit text), but in any case:

Reviewed-by: Douglas Anderson <[email protected]>
Tested-by: Douglas Anderson <[email protected]>

2024-06-06 03:23:25

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] Disable SS instances in park mode for SC7180/ SC7280


On Tue, 04 Jun 2024 11:36:57 +0530, Krishna Kurapati wrote:
> When working in host mode, in certain conditions, when the USB
> host controller is stressed, there is a HC died warning that comes up.
> Fix this up by disabling SS instances in park mode for SC7280 and SC7180.
>
> It is recommended to set this quirk for all Gen-1 SoCs. Will identify the
> other SoCs and push a separate series for the same.
>
> [...]

Applied, thanks!

[1/2] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode
commit: 5b8baed4b88132c12010ce6ca1b56f00d122e376
[2/2] arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode
commit: 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7

Best regards,
--
Bjorn Andersson <[email protected]>