diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2010-09-09 00:29:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-09 00:29:20 -0400 |
commit | 92e32eaee288ee2e838fe76680cbaeaea25643c6 (patch) | |
tree | 4411533cf6f942bb1934e915057b56cd693ea8f2 | |
parent | 2b1b8edfe229b1832134827c6948d0b70029e965 (diff) |
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>
-rw-r--r-- | drivers/usb/atm/cxacru.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index 593fc5e2d2e6..1c320bfa6fb7 100644 --- a/drivers/usb/atm/cxacru.c +++ b/drivers/usb/atm/cxacru.c | |||
@@ -1324,8 +1324,24 @@ static struct usbatm_driver cxacru_driver = { | |||
1324 | .tx_padding = 11, | 1324 | .tx_padding = 11, |
1325 | }; | 1325 | }; |
1326 | 1326 | ||
1327 | static int cxacru_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | 1327 | static int cxacru_usb_probe(struct usb_interface *intf, |
1328 | const struct usb_device_id *id) | ||
1328 | { | 1329 | { |
1330 | struct usb_device *usb_dev = interface_to_usbdev(intf); | ||
1331 | char buf[15]; | ||
1332 | |||
1333 | /* Avoid ADSL routers (cx82310_eth). | ||
1334 | * Abort if bDeviceClass is 0xff and iProduct is "USB NET CARD". | ||
1335 | */ | ||
1336 | if (usb_dev->descriptor.bDeviceClass == USB_CLASS_VENDOR_SPEC | ||
1337 | && usb_string(usb_dev, usb_dev->descriptor.iProduct, | ||
1338 | buf, sizeof(buf)) > 0) { | ||
1339 | if (!strcmp(buf, "USB NET CARD")) { | ||
1340 | dev_info(&intf->dev, "ignoring cx82310_eth device\n"); | ||
1341 | return -ENODEV; | ||
1342 | } | ||
1343 | } | ||
1344 | |||
1329 | return usbatm_usb_probe(intf, id, &cxacru_driver); | 1345 | return usbatm_usb_probe(intf, id, &cxacru_driver); |
1330 | } | 1346 | } |
1331 | 1347 | ||