public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Remove over-broad module alias from zaurus.
@ 2011-06-18  0:02 Dave Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Jones @ 2011-06-18  0:02 UTC (permalink / raw)
  To: Linux Kernel; +Cc: linux-usb

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@redhat.com>

diff --git a/drivers/net/usb/zaurus.c b/drivers/net/usb/zaurus.c
index 241756e..1a2234c 100644
--- a/drivers/net/usb/zaurus.c
+++ b/drivers/net/usb/zaurus.c
@@ -331,17 +331,7 @@ static const struct usb_device_id	products [] = {
 	ZAURUS_MASTER_INTERFACE,
 	.driver_info = ZAURUS_PXA_INFO,
 },
-
-
-/* At least some of the newest PXA units have very different lies about
- * their standards support:  they claim to be cell phones offering
- * direct access to their radios!  (No, they don't conform to CDC MDLM.)
- */
 {
-	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),

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

* Re: Remove over-broad module alias from zaurus.
@ 2012-03-26  8:39 Guan Xin
  2012-03-26 12:49 ` Dave Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Guan Xin @ 2012-03-26  8:39 UTC (permalink / raw)
  To: linux-kernel

> 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@redhat.com>
>
> diff --git a/drivers/net/usb/zaurus.c b/drivers/net/usb/zaurus.c
> index 241756e..1a2234c 100644
> --- a/drivers/net/usb/zaurus.c
> +++ b/drivers/net/usb/zaurus.c
> @@ -331,17 +331,7 @@ static const struct usb_device_id	products [] = {
>  	ZAURUS_MASTER_INTERFACE,
>  	.driver_info = ZAURUS_PXA_INFO,
>  },
> -
> -
> -/* At least some of the newest PXA units have very different lies about
> - * their standards support:  they claim to be cell phones offering
> - * direct access to their radios!  (No, they don't conform to CDC MDLM.)
> - */
>  {
> -	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?

Regards,
Guan

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

* Re: Remove over-broad module alias from zaurus.
  2012-03-26  8:39 Guan Xin
@ 2012-03-26 12:49 ` Dave Jones
  2012-03-26 13:14   ` Guan Xin
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Jones @ 2012-03-26 12:49 UTC (permalink / raw)
  To: Guan Xin; +Cc: linux-kernel

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@redhat.com>
 > > -	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

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

* Re: Remove over-broad module alias from zaurus.
  2012-03-26 12:49 ` Dave Jones
@ 2012-03-26 13:14   ` Guan Xin
  2012-03-26 13:22     ` Dave Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Guan Xin @ 2012-03-26 13:14 UTC (permalink / raw)
  To: Dave Jones, Guan Xin, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2178 bytes --]

On Mon, Mar 26, 2012 at 2:49 PM, Dave Jones <davej@redhat.com> 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@redhat.com>
>  > > -  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 #2: zaurus.diff --]
[-- Type: application/octet-stream, Size: 535 bytes --]

--- 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),

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

* Re: Remove over-broad module alias from zaurus.
  2012-03-26 13:14   ` Guan Xin
@ 2012-03-26 13:22     ` Dave Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Jones @ 2012-03-26 13:22 UTC (permalink / raw)
  To: Guan Xin; +Cc: linux-kernel

On Mon, Mar 26, 2012 at 03:14:00PM +0200, Guan Xin wrote:
 > On Mon, Mar 26, 2012 at 2:49 PM, Dave Jones <davej@redhat.com> wrote:

 > > Yes, just cut-n-paste one of the other entries, change the ID,
 > > make sure it works and send a diff.
 > >
 > 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),
 > 

Looks good, but needs a Signed-off-by: line. See Documentation/SubmittingPatches
(Also Cc: netdev@vger.kernel.org so it gets picked up by patchwork)

thanks,

	Dave


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

end of thread, other threads:[~2012-03-26 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-18  0:02 Remove over-broad module alias from zaurus Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2012-03-26  8:39 Guan Xin
2012-03-26 12:49 ` Dave Jones
2012-03-26 13:14   ` Guan Xin
2012-03-26 13:22     ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox