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

From: Uwe Bonnes
Date: Sat Oct 15 2011 - 11:11:16 EST


Hello,

The STxxDiscovery Modules are affordable small boards with an ARM Cortex3
microcontroller, Pins available at break-out headers and another smaller
Cortex3 with USB connection, providing a so called STLINK. The STLINK(V1) is
implemented as a mass storage device and the main STLINK functionality is
implemented as generic scsc commands. The mass storage implementation is
deeply broken:
http://code.google.com/p/arm-utilities/wiki/STLinkDownload (Usage)
Attaching the device causes tons of messages and the device is only
available minutes after plugging.
I now have rewritten linux stlink implementation to only use libusb. Now I
need a way to selective inhibit attaching the device to usb-storage. As a
first mean I can inhibit loading the usb_storage module, but that affects
other usb storage devices. In the long run, probably some modification in the
usb storage kernel code is best, but blacklisting there will need time to
propagate to the kernel tree and back to the distributions. So a way to
runtime blacklist is needed too.

Any hints welcome.
--
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/