Skip to content

Instantly share code, notes, and snippets.

@goldstar611
Created February 5, 2024 20:24
Show Gist options
  • Save goldstar611/ef5f93090c1ee7bc5ddb4b1e44e70abe to your computer and use it in GitHub Desktop.
Save goldstar611/ef5f93090c1ee7bc5ddb4b1e44e70abe to your computer and use it in GitHub Desktop.
openwrt_quirks.txt
# https://forum.openwrt.org/t/support-for-xiaomi-wifi-r3p-pro/20290/882
A short note here for those who (just like me) have problems with a UAS driver and USB3 external drives.
The symptoms are that the device is recognized and you can see it with lsusb -t command. The driver lists uas,
but the drive does not show up in /dev/sd*.
root@AndyNet:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/2p, 480M
At the same time, drives using usb-storage driver work well.
Unfortunately, removing the kernel module or actually removing the module file does not solve the problem
and the drive is listed without any driver at all. So, the solution is to set a quirk to hint the system
to use a specific driver for the drive:
Get the ID of the external drive with lsusb -v. There should be something like Bus 002 Device 002: ID 059f:105e LaCie, Ltd. Be careful to look for the actual device, not the USB hub.
Edit /etc/modules.d/usb-storage and append quirks=DEVICE_ID:u, so in my case the line looks like usb-storage quirks=059f:105e:u
Save and reboot. After reboot, check lsusb -t should list your drive with usb-storage driver instead of uas. And the drive should appear in /dev/.
Enjoy!
A side note, I do have kmod-usb-core, kmod-usb3, kmod-usb-storage, and kmod-usb-storage-uas installed.
And I do NOT have kmod-usb2 and kmod-usb-storage-extras.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment