linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Blacklisting certain functions on a USB device in udev?
@ 2009-11-09 20:12 Justin Schoeman
  2009-11-11 17:14 ` Justin Schoeman
  0 siblings, 1 reply; 2+ messages in thread
From: Justin Schoeman @ 2009-11-09 20:12 UTC (permalink / raw)
  To: linux-hotplug

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Blacklisting certain functions on a USB device in udev?
  2009-11-09 20:12 Blacklisting certain functions on a USB device in udev? Justin Schoeman
@ 2009-11-11 17:14 ` Justin Schoeman
  0 siblings, 0 replies; 2+ messages in thread
From: Justin Schoeman @ 2009-11-11 17:14 UTC (permalink / raw)
  To: linux-hotplug

Ping?

Can anybody at least point me at a decent resource on how to build udev 
rules?

Thanks,
Justin

Justin Schoeman wrote:
> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-11 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-09 20:12 Blacklisting certain functions on a USB device in udev? Justin Schoeman
2009-11-11 17:14 ` Justin Schoeman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).