mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
cxacru: ignore cx82310_eth devices
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> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2b1b8edfe2
commit
92e32eaee2
@ -1324,8 +1324,24 @@ static struct usbatm_driver cxacru_driver = {
|
||||
.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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user