public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS
@ 2025-06-18  5:51 xiehongyu1
  2025-06-18  6:03 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: xiehongyu1 @ 2025-06-18  5:51 UTC (permalink / raw)
  To: mathias.nyman; +Cc: linux-kernel, linux-usb, gregkh, Hongyu Xie

From: Hongyu Xie <xiehongyu1@kylinos.cn>

Disable stream for platform xHC controller with broken stream.

Signed-off-by: Hongyu Xie <xiehongyu1@kylinos.cn>
---
 drivers/usb/host/xhci-plat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 6dab142e72789..c79d5ed48a08b 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -328,7 +328,8 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
 	}
 
 	usb3_hcd = xhci_get_usb3_hcd(xhci);
-	if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4)
+	if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4 &&
+	    !(xhci->quirks & XHCI_BROKEN_STREAMS))
 		usb3_hcd->can_do_streams = 1;
 
 	if (xhci->shared_hcd) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS
  2025-06-18  5:51 [PATCH v1] xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS xiehongyu1
@ 2025-06-18  6:03 ` Greg KH
  2025-06-18  7:21   ` xiehongyu1
       [not found]   ` <b623ea20-84cd-414d-9b5a-f94d972f819f@kylinos.cn>
  0 siblings, 2 replies; 4+ messages in thread
From: Greg KH @ 2025-06-18  6:03 UTC (permalink / raw)
  To: xiehongyu1; +Cc: mathias.nyman, linux-kernel, linux-usb

On Wed, Jun 18, 2025 at 01:51:33PM +0800, xiehongyu1@kylinos.cn wrote:
> From: Hongyu Xie <xiehongyu1@kylinos.cn>
> 
> Disable stream for platform xHC controller with broken stream.
> 
> Signed-off-by: Hongyu Xie <xiehongyu1@kylinos.cn>
> ---
>  drivers/usb/host/xhci-plat.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
> index 6dab142e72789..c79d5ed48a08b 100644
> --- a/drivers/usb/host/xhci-plat.c
> +++ b/drivers/usb/host/xhci-plat.c
> @@ -328,7 +328,8 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
>  	}
>  
>  	usb3_hcd = xhci_get_usb3_hcd(xhci);
> -	if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4)
> +	if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4 &&
> +	    !(xhci->quirks & XHCI_BROKEN_STREAMS))
>  		usb3_hcd->can_do_streams = 1;
>  
>  	if (xhci->shared_hcd) {
> -- 
> 2.25.1
> 
> 

Should this be backported to stable kernels?  if so, how far back?

What commit id does this fix?  Or what hardware does this fix?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS
  2025-06-18  6:03 ` Greg KH
@ 2025-06-18  7:21   ` xiehongyu1
       [not found]   ` <b623ea20-84cd-414d-9b5a-f94d972f819f@kylinos.cn>
  1 sibling, 0 replies; 4+ messages in thread
From: xiehongyu1 @ 2025-06-18  7:21 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-usb, mathias.nyman, xiehongyu1

From: Hongyu Xie <xiehongyu1@kylinos.cn>

Hi greg

在 2025/6/18 14:03, Greg KH 写道:
> On Wed, Jun 18, 2025 at 01:51:33PM +0800,xiehongyu1@kylinos.cn wrote:
>> From: Hongyu Xie<xiehongyu1@kylinos.cn>
>>
>> Disable stream for platform xHC controller with broken stream.
>>
>> Signed-off-by: Hongyu Xie<xiehongyu1@kylinos.cn>
>> ---
>>   drivers/usb/host/xhci-plat.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
>> index 6dab142e72789..c79d5ed48a08b 100644
>> --- a/drivers/usb/host/xhci-plat.c
>> +++ b/drivers/usb/host/xhci-plat.c
>> @@ -328,7 +328,8 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
>>   	}
>>   
>>   	usb3_hcd = xhci_get_usb3_hcd(xhci);
>> -	if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4)
>> +	if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4 &&
>> +	    !(xhci->quirks & XHCI_BROKEN_STREAMS))
>>   		usb3_hcd->can_do_streams = 1;
>>   
>>   	if (xhci->shared_hcd) {
>> -- 
>> 2.25.1
>>
>>
> Should this be backported to stable kernels?  if so, how far back?
At least 5.4 lts.
> What commit id does this fix?  Or what hardware does this fix?

I'm not sure. can_do_streams was introduced by 14aec589327a6 ("storage: 
accept some UAS devices if streams are unavailable") in Feb 11 20:36:04 
2014 before

XHCI_BROKEN_STREAMS was introduced by 8f873c1ff4ca0 ("xhci: Blacklist 
using streams on the Etron EJ168 controller") in Fri Jul 25 22:01:18 2014.

> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS
       [not found]   ` <b623ea20-84cd-414d-9b5a-f94d972f819f@kylinos.cn>
@ 2025-06-18  7:32     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2025-06-18  7:32 UTC (permalink / raw)
  To: xiehongyu1; +Cc: linux-kernel, linux-usb, mathias.nyman

On Wed, Jun 18, 2025 at 03:08:09PM +0800, xiehongyu1@kylinos.cn wrote:
> From: Hongyu Xie
> 
> Hi Greg

Please do not sent html email, the mailing lists reject it :(

> 在 2025/6/18 14:03, Greg KH 写道:
> 
>     On Wed, Jun 18, 2025 at 01:51:33PM +0800, xiehongyu1@kylinos.cn wrote:
> 
>         From: Hongyu Xie <xiehongyu1@kylinos.cn>
> 
>         Disable stream for platform xHC controller with broken stream.
> 
>         Signed-off-by: Hongyu Xie
>         ---
>          drivers/usb/host/xhci-plat.c | 3 ++-
>          1 file changed, 2 insertions(+), 1 deletion(-)
> 
>         diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
>         index 6dab142e72789..c79d5ed48a08b 100644
>         --- a/drivers/usb/host/xhci-plat.c
>         +++ b/drivers/usb/host/xhci-plat.c
>         @@ -328,7 +328,8 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
>                 }
> 
>                 usb3_hcd = xhci_get_usb3_hcd(xhci);
>         -       if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4)
>         +       if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4 &&
>         +           !(xhci->quirks & XHCI_BROKEN_STREAMS))
>                         usb3_hcd->can_do_streams = 1;
> 
>                 if (xhci->shared_hcd) {
>         --
>         2.25.1
> 
> 
> 
>     Should this be backported to stable kernels?  if so, how far back?
> 
> At least 5.4 lts.

Great, please mark it properly.

>     What commit id does this fix?  Or what hardware does this fix?
> 
> I'm not sure. can_do_streams was introduced by 14aec589327a6 ("storage: accept
> some UAS devices if streams are unavailable") in Feb 11 20:36:04 2014
> 
> before XHCI_BROKEN_STREAMS was introduced by 8f873c1ff4ca0 ("xhci: Blacklist
> using streams on the Etron EJ168 controller") in Fri Jul 25 22:01:18 2014.

Pick the proper one as you obviously have hardware here that you have
tested that needs this change, right?  :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-18  7:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18  5:51 [PATCH v1] xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS xiehongyu1
2025-06-18  6:03 ` Greg KH
2025-06-18  7:21   ` xiehongyu1
     [not found]   ` <b623ea20-84cd-414d-9b5a-f94d972f819f@kylinos.cn>
2025-06-18  7:32     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox