Re: How to blacklist a usb_storage device from attach to the usb_storage module

From: Uwe Bonnes
Date: Mon Oct 17 2011 - 04:53:14 EST


>>>>> "Uwe" == Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:

Uwe> Hello, The STxxDiscovery Modules are affordable small boards with
...
Uwe> blacklisting there will need time to propagate to the kernel tree
Uwe> and back to the distributions. So a way to runtime blacklist is
Uwe> needed too.

To answer my own question, at least partial, with and udev Rule like
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="0483", \
ATTRS{idProduct}=="3744", DRIVER=="usb-storage", \
RUN+="/bin/sh -c 'echo -n %k> %S%p/driver/unbind'"

as the first rule for the device, the device still binds to the driver but
as first action is unbinded.

Should such a device still be blacklisted in the kernel somehow?

--
Uwe Bonnes bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/