[FS#3662] Parameters aren't passed to kernel modules at boot

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Thu Mar 4 19:22:09 GMT 2021


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#3662 - Parameters aren't passed to kernel modules at boot
User who did this - Mateus B. Cassiano (mbc07)

----------
I managed to create a workaround that works, but it's kinda ugly. It's a startup service that adds the quirk parameter to the kernel module manually after it has been already loaded, then it proceeds detaching then reattaching the USB XHCI hub to force reload all child devices with the new parameters, without needing to physically unplug/replug the HDD.

Create **/etc/init.d/usb-uas-workaround** and add the following content to the file:
#!/bin/sh /etc/rc.common
# Disable UAS for Seagate Expansion Drive

START=10

boot() {
        echo "0bc2:231a:u" > /sys/module/usb_storage/parameters/quirks
        echo "2-0:1.0" > /sys/bus/usb/drivers/hub/unbind
        echo "2-0:1.0" > /sys/bus/usb/drivers/hub/bind
}
Then give it execute permissions (chmod 755) and enable the service through LuCI (System => Startup) or through SSH. You'll need to adjust the device VID/PID on the first line to match your particular HDD and also the USB node that corresponds to the XHCI hub on your router (the ones I provided should work on MT7621-based routers). Reboot when you're done and it should work.

I only did limited testing and this can certainly cause issues on more complex scenarios (e.g. having the disk connected to an external USB hub instead of being directly plugged on the router), but that's what I could come up with in the mean time. 

A definitive fix requires patching whatever is making kmodloader ignore the passed parameters when reading the files from **/etc/modules.d**, but that's out of my reach...
----------

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3662#comment9458

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the openwrt-bugs mailing list