aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/usb/pegasus.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index b588c890ea7..a84ba487c71 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -1285,6 +1285,21 @@ static void check_carrier(struct work_struct *work)
1285 } 1285 }
1286} 1286}
1287 1287
1288static int pegasus_blacklisted(struct usb_device *udev)
1289{
1290 struct usb_device_descriptor *udd = &udev->descriptor;
1291
1292 /* Special quirk to keep the driver from handling the Belkin Bluetooth
1293 * dongle which happens to have the same ID.
1294 */
1295 if ((udd->idVendor == VENDOR_BELKIN && udd->idProduct == 0x0121) &&
1296 (udd->bDeviceClass == USB_CLASS_WIRELESS_CONTROLLER) &&
1297 (udd->bDeviceProtocol == 1))
1298 return 1;
1299
1300 return 0;
1301}
1302
1288static int pegasus_probe(struct usb_interface *intf, 1303static int pegasus_probe(struct usb_interface *intf,
1289 const struct usb_device_id *id) 1304 const struct usb_device_id *id)
1290{ 1305{
@@ -1296,6 +1311,12 @@ static int pegasus_probe(struct usb_interface *intf,
1296 DECLARE_MAC_BUF(mac); 1311 DECLARE_MAC_BUF(mac);
1297 1312
1298 usb_get_dev(dev); 1313 usb_get_dev(dev);
1314
1315 if (pegasus_blacklisted(dev)) {
1316 res = -ENODEV;
1317 goto out;
1318 }
1319
1299 net = alloc_etherdev(sizeof(struct pegasus)); 1320 net = alloc_etherdev(sizeof(struct pegasus));
1300 if (!net) { 1321 if (!net) {
1301 dev_err(&intf->dev, "can't allocate %s\n", "device"); 1322 dev_err(&intf->dev, "can't allocate %s\n", "device");