diff mbox series

[v4] uas: add no-uas quirk for Thinkplus and Hiksemi usb-storage

Message ID 1662015653-12976-1-git-send-email-zenghongling@kylinos.cn (mailing list archive)
State New, archived
Headers show
Series [v4] uas: add no-uas quirk for Thinkplus and Hiksemi usb-storage | expand

Commit Message

Hongling Zeng Sept. 1, 2022, 7 a.m. UTC
UAS:if ignore uas feature for these drivers can fix the not working and
output error message bug.

The UAS mode of Thinkplus and Hiksemi is reported to fail to work on
several platforms with the following error message,I tested these USB
disks on other architecture platforms as arm/loongson for different xHCI
controller,the same error occurred:

[   39.702439] xhci_hcd 0000:0c:00.3: ERROR Transfer event for disabled
               endpoint or incorrect stream ring
[   39.702442] xhci_hcd 0000:0c:00.3: @000000026c61f810 00000000 00000000
               1b000000 05038000

[  592.490369][ 1] xhci_hcd 0000:0c:00.3: Assuming host is dying, halting host.
[  592.518442][ 2] sd 8:0:0:0: [sda] tag#17 uas_eh_abort_handler 0 uas-tag 18
                   inflight: CMD
[  592.527575][ 2] sd 8:0:0:0: [sda] tag#17 CDB: Write(10) 2a 00 03 6f 88 00 00
                   04 00 00
[  592.536330][ 2] sd 8:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1
                   inflight: CMD
[  592.545266][ 2] sd 8:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 07 44 1a 88 00
                   00 08 00

And when running iozone will disconnect from the USB controller, then after
re-connecting the device will be offlined and not working at all.

We changed a lot of USB devices and contact relevant manufacturers to 
confirm the USB disk is ok.

Signed-off-by: zenghongling <zenghongling@kylinos.cn>
---
change for v4
 - Change the send patch email address

change for v3
 - Add the a description of why the patch is needed.

change for v2
 -Change the ./script/checkpatch.pl warning.
--
---
 drivers/usb/storage/unusual_uas.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Greg KH Sept. 1, 2022, 8:37 a.m. UTC | #1
On Thu, Sep 01, 2022 at 03:00:53PM +0800, zenghongling wrote:
> UAS:if ignore uas feature for these drivers can fix the not working and
> output error message bug.
> 
> The UAS mode of Thinkplus and Hiksemi is reported to fail to work on
> several platforms with the following error message,I tested these USB
> disks on other architecture platforms as arm/loongson for different xHCI
> controller,the same error occurred:
> 
> [   39.702439] xhci_hcd 0000:0c:00.3: ERROR Transfer event for disabled
>                endpoint or incorrect stream ring
> [   39.702442] xhci_hcd 0000:0c:00.3: @000000026c61f810 00000000 00000000
>                1b000000 05038000
> 
> [  592.490369][ 1] xhci_hcd 0000:0c:00.3: Assuming host is dying, halting host.
> [  592.518442][ 2] sd 8:0:0:0: [sda] tag#17 uas_eh_abort_handler 0 uas-tag 18
>                    inflight: CMD
> [  592.527575][ 2] sd 8:0:0:0: [sda] tag#17 CDB: Write(10) 2a 00 03 6f 88 00 00
>                    04 00 00
> [  592.536330][ 2] sd 8:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1
>                    inflight: CMD
> [  592.545266][ 2] sd 8:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 07 44 1a 88 00
>                    00 08 00
> 
> And when running iozone will disconnect from the USB controller, then after
> re-connecting the device will be offlined and not working at all.
> 
> We changed a lot of USB devices and contact relevant manufacturers to 
> confirm the USB disk is ok.

I do not understand why there are failures on Linux, yet not on other
operating systems.  If you run iozone on OS-X, does the same errors
happen?  How about a storage stress-test on Windows?  Why is Linux going
to have to make these devices go very very slow and what will happen to
the users that now can not operate their devices at the advertised
speeds?  Who will handle that support issue?

thanks,

greg k-h
Greg KH Sept. 1, 2022, 10:02 a.m. UTC | #2
A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Thu, Sep 01, 2022 at 05:35:50PM +0800, dd wrote:
> Hi:

Please fix your email client to not send html email, as that is rejected
by the mailing list and will not show up to anyone :(

Can you fix that up and respond again?

thanks,

greg k-h
Greg KH Sept. 1, 2022, 12:33 p.m. UTC | #3
On Thu, Sep 01, 2022 at 08:13:24PM +0800, zhongling0719@126.com wrote:
> Sorry, have fixed the email client to send html email.

This was sent in html format :(
zhongling0719@126.com Sept. 1, 2022, 12:38 p.m. UTC | #4
Hi:
   Sorry again, The last email was wrong, fixed my email to not send html email and respond again. 
   The drivers manufacturers advertised high speed support platform is Windows,MacOSX, not include linux 4.9 , this bug will affect the users 
normal use, run iozone is just one of the behaviors that trigger UAS crash ,We will handle that slow issue.

Thanks!

zhongling0719@126.com
 
From: Greg KH
Date: 2022-09-01 16:37
To: zenghongling
CC: stern; linux-usb; usb-storage; zhongling0719
Subject: Re: [PATCH v4] uas: add no-uas quirk for Thinkplus and Hiksemi usb-storage
On Thu, Sep 01, 2022 at 03:00:53PM +0800, zenghongling wrote:
> UAS:if ignore uas feature for these drivers can fix the not working and
> output error message bug.
>
> The UAS mode of Thinkplus and Hiksemi is reported to fail to work on
> several platforms with the following error message,I tested these USB
> disks on other architecture platforms as arm/loongson for different xHCI
> controller,the same error occurred:
>
> [   39.702439] xhci_hcd 0000:0c:00.3: ERROR Transfer event for disabled
>                endpoint or incorrect stream ring
> [   39.702442] xhci_hcd 0000:0c:00.3: @000000026c61f810 00000000 00000000
>                1b000000 05038000
>
> [  592.490369][ 1] xhci_hcd 0000:0c:00.3: Assuming host is dying, halting host.
> [  592.518442][ 2] sd 8:0:0:0: [sda] tag#17 uas_eh_abort_handler 0 uas-tag 18
>                    inflight: CMD
> [  592.527575][ 2] sd 8:0:0:0: [sda] tag#17 CDB: Write(10) 2a 00 03 6f 88 00 00
>                    04 00 00
> [  592.536330][ 2] sd 8:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1
>                    inflight: CMD
> [  592.545266][ 2] sd 8:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 07 44 1a 88 00
>                    00 08 00
>
> And when running iozone will disconnect from the USB controller, then after
> re-connecting the device will be offlined and not working at all.
>
> We changed a lot of USB devices and contact relevant manufacturers to
> confirm the USB disk is ok.
 
I do not understand why there are failures on Linux, yet not on other
operating systems.  If you run iozone on OS-X, does the same errors
happen?  How about a storage stress-test on Windows?  Why is Linux going
to have to make these devices go very very slow and what will happen to
the users that now can not operate their devices at the advertised
speeds?  Who will handle that support issue?
 
thanks,
 
greg k-h
Greg KH Sept. 1, 2022, 1:04 p.m. UTC | #5
On Thu, Sep 01, 2022 at 08:38:21PM +0800, zhongling0719@126.com wrote:
> Hi:
>    Sorry again, The last email was wrong, fixed my email to not send html email and respond again. 
>    The drivers manufacturers advertised high speed support platform is Windows,MacOSX, not include linux 4.9 , this bug will affect the users 
> normal use, run iozone is just one of the behaviors that trigger UAS crash ,We will handle that slow issue.

I do not understand, sorry.

What is special about Linux that causes these drives to break with the
UAS protocol?  What is it doing different that OSX and Windows does not
do?

We should fix that bug, not degrade the performance of these devices to
extremely slow levels for no good reason.

thanks,

greg k-h
zhongling0719@126.com Sept. 1, 2022, 1:58 p.m. UTC | #6
Some UASP capable USB-to-SATA bridge controllers are not compatible,this problem has always existed. you can refer to
other auther submit the similar patch. this patch is fixed no speed,not slow speed.

Thanks!  

zhongling0719@126.com
 
From: gregkh
Date: 2022-09-01 21:04
To: zhongling0719@126.com
CC: zenghongling; stern; linux-usb; usb-storage
Subject: Re: Re: [PATCH v4] uas: add no-uas quirk for Thinkplus and Hiksemi usb-storage
On Thu, Sep 01, 2022 at 08:38:21PM +0800, zhongling0719@126.com wrote:
> Hi:
>    Sorry again, The last email was wrong, fixed my email to not send html email and respond again. 
>    The drivers manufacturers advertised high speed support platform is Windows,MacOSX, not include linux 4.9 , this bug will affect the users 
> normal use, run iozone is just one of the behaviors that trigger UAS crash ,We will handle that slow issue.
 
I do not understand, sorry.
 
What is special about Linux that causes these drives to break with the
UAS protocol?  What is it doing different that OSX and Windows does not
do?
 
We should fix that bug, not degrade the performance of these devices to
extremely slow levels for no good reason.
 
thanks,
 
greg k-h
Greg KH Sept. 1, 2022, 2:32 p.m. UTC | #7
A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Thu, Sep 01, 2022 at 09:58:03PM +0800, zhongling0719@126.com wrote:
> Some UASP capable USB-to-SATA bridge controllers are not compatible,this problem has always existed.

What problem is this exactly?  Why is this failing on only Linux?

> you can refer to other auther submit the similar patch.

What other author and other patch?

> this patch is fixed no speed,not slow speed.

I do not understand, sorry.

thanks,

greg k-h
zhongling0719@126.com Sept. 1, 2022, 3:21 p.m. UTC | #8
sorry, Falling back to USB mass storage can solve this problem, so ignore UAS
function of the chips. I don't investigation for windows system. 


Thanks!

zhongling0719@126.com
 
From: gregkh
Date: 2022-09-01 22:32
To: zhongling0719@126.com
CC: zenghongling; stern; linux-usb; usb-storage
Subject: Re: Re: [PATCH v4] uas: add no-uas quirk for Thinkplus and Hiksemi usb-storage
A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
 
A: No.
Q: Should I include quotations after my reply?
 
http://daringfireball.net/2007/07/on_top
 
On Thu, Sep 01, 2022 at 09:58:03PM +0800, zhongling0719@126.com wrote:
> Some UASP capable USB-to-SATA bridge controllers are not compatible,this problem has always existed.
 
What problem is this exactly?  Why is this failing on only Linux?
 
> you can refer to other auther submit the similar patch.
 
What other author and other patch?
 
> this patch is fixed no speed,not slow speed.
 
I do not understand, sorry.
 
thanks,
 
greg k-h
zhongling0719@126.com Sept. 2, 2022, 6:30 a.m. UTC | #9
Sorry,replay again

a)These disks have a broken uas implementation, the tag field of the 
status iu-s is not set properly,
so we need to fall-back to usb-storage for these.

b).I found this patch . The causes of errors are similar.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.9.326&id=3ba5d3a2cf40c4ebdc1f702af3b5dea405a6a11e

c) not to express clearly, the driver cause hang on by copy big files or 
stress read/write.


在 2022年09月01日 22:32, gregkh 写道:
> A: http://en.wikipedia.org/wiki/Top_post
> Q: Were do I find info about this thing called top-posting?
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> A: No.
> Q: Should I include quotations after my reply?
>
> http://daringfireball.net/2007/07/on_top
>
> On Thu, Sep 01, 2022 at 09:58:03PM +0800, zhongling0719@126.com wrote:
>> Some UASP capable USB-to-SATA bridge controllers are not compatible,this problem has always existed.
> What problem is this exactly?  Why is this failing on only Linux?
>
>> you can refer to other auther submit the similar patch.
> What other author and other patch?
>
>>   this patch is fixed no speed,not slow speed.
> I do not understand, sorry.
>
> thanks,
>
> greg k-h
zhongling0719@126.com Sept. 2, 2022, 9:04 a.m. UTC | #10
explain for this:
   this patch is fixed no speed,not slow speed.
I do not understand, sorry.

---I just checked,I got the disk test data wrong , the high speed is for 
usb3.2 , these disks are usb3.0 ,so the slower speed is normal.
the disks of USB3-FW appears to be incompatible with UAS cause crash to 
no speed.

Thanks!


在 2022年09月02日 14:30, nana 写道:
> Sorry,replay again
>
> a)These disks have a broken uas implementation, the tag field of the 
> status iu-s is not set properly,
> so we need to fall-back to usb-storage for these.
>
> b).I found this patch . The causes of errors are similar.
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.9.326&id=3ba5d3a2cf40c4ebdc1f702af3b5dea405a6a11e 
>
>
> c) not to express clearly, the driver cause hang on by copy big files 
> or stress read/write.
>
>
> 在 2022年09月01日 22:32, gregkh 写道:
>> A: http://en.wikipedia.org/wiki/Top_post
>> Q: Were do I find info about this thing called top-posting?
>> A: Because it messes up the order in which people normally read text.
>> Q: Why is top-posting such a bad thing?
>> A: Top-posting.
>> Q: What is the most annoying thing in e-mail?
>>
>> A: No.
>> Q: Should I include quotations after my reply?
>>
>> http://daringfireball.net/2007/07/on_top
>>
>> On Thu, Sep 01, 2022 at 09:58:03PM +0800, zhongling0719@126.com wrote:
>>> Some UASP capable USB-to-SATA bridge controllers are not 
>>> compatible,this problem has always existed.
>> What problem is this exactly?  Why is this failing on only Linux?
>>
>>> you can refer to other auther submit the similar patch.
>> What other author and other patch?
>>
>>>   this patch is fixed no speed,not slow speed.
>> I do not understand, sorry.
>>
>> thanks,
>>
>> greg k-h
>
diff mbox series

Patch

diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h
index cdff7dc..ddcdf1a 100644
--- a/drivers/usb/storage/unusual_uas.h
+++ b/drivers/usb/storage/unusual_uas.h
@@ -62,6 +62,12 @@  UNUSUAL_DEV(0x059f, 0x1061, 0x0000, 0x9999,
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_IGNORE_UAS),
 
+UNUSUAL_DEV(0x090c, 0x2000, 0x0000, 0x9999,
+		"Hiksemi",
+		"External HDD",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_IGNORE_UAS),
+
 /*
  * Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to SCSI
  * commands in UAS mode.  Observed with the 1.28 firmware; are there others?
@@ -142,6 +148,12 @@  UNUSUAL_DEV(0x0bc2, 0xab2a, 0x0000, 0x9999,
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_NO_ATA_1X),
 
+UNUSUAL_DEV(0x0bda, 0x9210, 0x0000, 0x9999,
+		"Hiksemi",
+		"External HDD",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_IGNORE_UAS),
+
 /* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */
 UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999,
 		"Initio Corporation",
@@ -184,6 +196,12 @@  UNUSUAL_DEV(0x154b, 0xf00d, 0x0000, 0x9999,
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_NO_ATA_1X),
 
+UNUSUAL_DEV(0x17ef, 0x3899, 0x0000, 0x9999,
+		"Thinkplus",
+		"External HDD",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_IGNORE_UAS),
+
 /* Reported-by: Hans de Goede <hdegoede@redhat.com> */
 UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
 		"VIA",