hal-info: Do not mount the CD drive of the Huawei E220 USB HSDPA modem

Sam Morris sam at robots.org.uk
Sat Mar 22 05:42:52 PDT 2008

On Mon, 2008-03-10 at 21:02 +0000, Bastien Nocera wrote:
> On Mon, 2008-03-10 at 18:13 +0000, Sam Morris wrote:
> > Package: hal-info
> > Version: 20080215-1
> > Severity: normal
> > Tags: patch
> > 
> > The Huawei E220 is a USB HSPDA/GPRS modem. It appears to the computer as
> > a USB CD drive, on which are drivers for Windows systems. Of course, we
> > need no such drivers, so the CD drive is useless and annoying as it is
> > mounted by GNOME whenever a user logs in.
> > 
> > The attached patch (taken from
> > <https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/105545>)
> > causes HAL to ignore the CD drive.
> That's wrong. There's a blacklist in the kernel for that. See:
> http://thread.gmane.org/gmane.linux.kernel/597829
> It's even mentioned in the bug you linked. The quirk in the kernel tree
> is supposed to poke the device into serial mode, from storage mode. Why
> is that not working?

Right, I spent some time looking into this. There are three commits that

The first one use the UNUSUAL_DEV macro to tell the usb-storage code to
ignore the device completely. This was present in 2.6.20 and can be seen

The second commit reverted this patch; it was present in 2.6.22 and can
be seen at

The third commit,
<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d853d872c14b9adc4adad29e56cd378b291f86e0> is present in 2.6.24. It brings back an UNUSUAL_DEV entry for the Huawei device, but look at the final argument to the macro ('flags').

In the first commit, it was 'US_FL_IGNORE_DEVICE'. In the third commit,
it is instead '0'. So that explains why the kernel does not ignore the
usb-storage part of the device since 2.6.24, and why I think hal-info
should be updated with a blacklist entry for this device.

Sam Morris <sam at robots.org.uk>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/hal/attachments/20080322/97fc3bdb/attachment.pgp 

More information about the hal mailing list