From mboxrd@z Thu Jan 1 00:00:00 1970 From: Justin Schoeman Date: Mon, 09 Nov 2009 20:12:30 +0000 Subject: Blacklisting certain functions on a USB device in udev? Message-Id: <4AF877AE.3040302@expertron.co.za> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hi all, I am trying to get my Huawei E220 3G modem working with the new Linux kernels. The USB device registers 3 functions. 2 usb-serial devices, and 1 usb-storage device. Unfortunately, a firmware bug is causing the device to reset when userland apps try to mount the usb-storage device. A simple way to get things working is to just kill udevd after the serial ports are registered, and before the scsi device scan completes, but obviously this is not ideal ;-) . I have been experimenting by creating /etc/udev/rules.d/01-blacklist, and adding rules to try ignore the storage device. This: SUBSYSTEMS="usb", ATTRS{idVendor}="12d1", OPTIONS:="ignore_device" successfully ignores the USB device entirely (serial and storage options). This: SUBSYSTEMS="usb", ATTRS{idVendor}="12d1", ATTRS{bInterfaceClass}="08", OPTIONS:="ignore_device" should only match the storage device, and ignore it, but it doesn't seem to work. I have tried more exotic solutions like: SUBSYSTEM="usb-serial", ATTRS{idVendor}="12d1", GOTO="blacklist_skip_huawei" SUBSYSTEMS="usb", ATTRS{idVendor}="12d1", OPTIONS:="ignore_device" LABEL="blacklist_skip_huawei" but the storage device is still mounted. Is there any way to debug the rule parsing to see exactly which rules are matched/violated? Can anybody perhaps help with tips/advice on how to construct this blacklist? Thanks, Justin PS I am not subscribed to the list. Please CC me any replies.