Re: Remove over-broad module alias from zaurus.

From: Guan Xin
Date: Mon Mar 26 2012 - 09:14:39 EST


On Mon, Mar 26, 2012 at 2:49 PM, Dave Jones <davej@xxxxxxxxxx> wrote:
> On Mon, Mar 26, 2012 at 10:39:48AM +0200, Guan Xin wrote:
> Â> > On Fri, 17 Jun 2011 20:02:10 -0400, Dave Jones wrote:
> Â> > This module and a bunch of dependancies are getting loaded on several
> Â> > of laptops I have (probably picking up the mobile broadband device),
> Â> > that have nothing to do with zaurus. Matching by class without
> Â> > any vendor/device pair isn't the right thing to do here, as it
> Â> > will prevent any other driver from correctly binding to it.
> Â> > (Or in the absense of a driver, will just waste time & memory by
> Â> > Âunnecessarily loading modules)
> Â> >
> Â> > Signed-off-by: Dave Jones <davej@xxxxxxxxxx>
> Â> > - ÂUSB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM,
> Â> > - Â Â Â Â Â Â Â Â ÂUSB_CDC_PROTO_NONE),
> Â> > - Â.driver_info = (unsigned long) &bogus_mdlm_info,
> Â> > -}, {
> Â> > Â Â/* Motorola MOTOMAGX phones */
> Â> > Â ÂUSB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x6425, USB_CLASS_COMM,
> Â> > Â Â Â Â Â Â Â Â Â ÂUSB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),
> Â>
> Â> After removal of this, my Motorola Rokr E6 (22b8:6027) cannot be recognized.
> Â> Can this be added back with more specific device info, just like the
> Â> Motorola MOTOMAGX phones?
>
> Yes, just cut-n-paste one of the other entries, change the ID,
> make sure it works and send a diff.
>
> Â Â Â ÂDave

This patch is tested to work with 2.6.39.4 and 3.2.13.

--- a/drivers/net/usb/zaurus.c 2012-03-26 14:59:36.702998639 +0200
+++ b/drivers/net/usb/zaurus.c 2012-03-26 15:02:16.860801959 +0200
@@ -332,6 +332,11 @@
.driver_info = ZAURUS_PXA_INFO,
},
{
+ /* Motorola Rokr E6 */
+ USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x6027, USB_CLASS_COMM,
+ USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),
+ .driver_info = (unsigned long) &bogus_mdlm_info,
+}, {
/* Motorola MOTOMAGX phones */
USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x6425, USB_CLASS_COMM,
USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),

Guan

Attachment: zaurus.diff
Description: Binary data