getumbrel / umbrel-os

umbrelOS for Raspberry Pi 4 (only). Covert your Raspberry Pi into a home server in one click. For other hardware, checkout https://github.com/getumbrel/umbrel
https://umbrel.com
BSD 3-Clause "New" or "Revised" License
590 stars 55 forks source link

Disable UAS for JMicron JMS578 and JMS579 #95

Closed mayankchhabra closed 4 years ago

mayankchhabra commented 4 years ago

JMicron's JMS578 and JMS579 are one of the most popular chipsets used in USB-to-SATA adapters, but they're still blacklisted by the kernel USB subsystem and require explicit quirk to disable UAS.

This PR adds an explicit quirk to disable UAS for both the chipsets.

Net effect: SSD read speed before the quirk: 50-100kbps SSD read speed after the quirk: ~200mbps (depending upon the SSD)

Further reading:

AaronDewes commented 4 years ago

but they're still blacklisted by the kernel USB subsystem and require explicit quirk to disable UAS.

According to https://www.raspberrypi.org/forums/viewtopic.php?t=245931, if I understand it correctly, they are not blacklisted but should be. UAS is enabled except if the device is in the blacklist.

mayankchhabra commented 4 years ago

I'm not sure I understood you fully there... but I can confirm that JMS578 chipset is indeed blacklisted as that's what I use. And adding a usb-storage quirk disabled UAS for it and now I can successfully use it.

AaronDewes commented 4 years ago

As far as I understand this, blacklisted devices work, the quirk adds them to the blacklist. The blacklist contains devices which don't support UAS, not devices that should use UAS

mayankchhabra commented 4 years ago

blacklisted devices work, the quirk adds them to the blacklist

Oh no, the quirk disables UAS for the device that is added.

The blacklist contains devices which don't support UAS, not devices that should use UAS

This is true. That's why we add a quirk here, to switch off UAS for these specific chipsets since they're blacklisted by default.