Message ID | 201009082252.15865.linux@rainbow-software.org |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, Sep 08, 2010 at 10:52:12PM +0200, Ondrej Zary wrote: > Ignore ADSL routers, which can have the same vendor and product IDs > as ADSL modems but should be handled by the cx82310_eth driver. > > This intentionally ignores device IDs that aren't currently handled > by cx82310_eth. There may be other device IDs that perhaps shouldn't > be claimed by cxacru. Looks good, thanks, I'll go queue it up. greg k-h -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Ondrej Zary <linux@rainbow-software.org> Date: Wed, 8 Sep 2010 22:52:12 +0200 > Ignore ADSL routers, which can have the same vendor and product IDs > as ADSL modems but should be handled by the cx82310_eth driver. > > This intentionally ignores device IDs that aren't currently handled > by cx82310_eth. There may be other device IDs that perhaps shouldn't > be claimed by cxacru. > > Signed-off-by: Ondrej Zary <linux@rainbow-software.org> > Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Applied with some minor comment formatting fixes, thanks! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Greg KH <greg@kroah.com> Date: Wed, 8 Sep 2010 20:35:57 -0700 > On Wed, Sep 08, 2010 at 10:52:12PM +0200, Ondrej Zary wrote: >> Ignore ADSL routers, which can have the same vendor and product IDs >> as ADSL modems but should be handled by the cx82310_eth driver. >> >> This intentionally ignores device IDs that aren't currently handled >> by cx82310_eth. There may be other device IDs that perhaps shouldn't >> be claimed by cxacru. > > Looks good, thanks, I'll go queue it up. Greg, see my reply, I already tossed this into net-next-2.6 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Sep 08, 2010 at 11:07:47PM -0700, David Miller wrote: > From: Greg KH <greg@kroah.com> > Date: Wed, 8 Sep 2010 20:35:57 -0700 > > > On Wed, Sep 08, 2010 at 10:52:12PM +0200, Ondrej Zary wrote: > >> Ignore ADSL routers, which can have the same vendor and product IDs > >> as ADSL modems but should be handled by the cx82310_eth driver. > >> > >> This intentionally ignores device IDs that aren't currently handled > >> by cx82310_eth. There may be other device IDs that perhaps shouldn't > >> be claimed by cxacru. > > > > Looks good, thanks, I'll go queue it up. > > Greg, see my reply, I already tossed this into net-next-2.6 Ah, that's fine, thanks for doing this, much appreciated. greg k-h -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- linux-2.6.36-rc3-orig/drivers/usb/atm/cxacru.c 2010-08-29 17:36:04.000000000 +0200 +++ linux-2.6.36-rc3/drivers/usb/atm/cxacru.c 2010-09-08 22:42:47.000000000 +0200 @@ -1324,8 +1324,23 @@ static struct usbatm_driver cxacru_drive .tx_padding = 11, }; -static int cxacru_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) +static int cxacru_usb_probe(struct usb_interface *intf, + const struct usb_device_id *id) { + struct usb_device *usb_dev = interface_to_usbdev(intf); + char buf[15]; + + /* avoid ADSL routers (cx82310_eth) + * abort if bDeviceClass is 0xff and iProduct is "USB NET CARD" */ + if (usb_dev->descriptor.bDeviceClass == USB_CLASS_VENDOR_SPEC + && usb_string(usb_dev, usb_dev->descriptor.iProduct, + buf, sizeof(buf)) > 0) { + if (!strcmp(buf, "USB NET CARD")) { + dev_info(&intf->dev, "ignoring cx82310_eth device\n"); + return -ENODEV; + } + } + return usbatm_usb_probe(intf, id, &cxacru_driver); }