Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107994
b: refs/heads/master
c: 4f63135
h: refs/heads/master
v: v3
  • Loading branch information
Ben Collins authored and Jeff Garzik committed Aug 7, 2008
1 parent afac234 commit 284e6c5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11a859e591befae7413505c68dd241ad8e14748c
refs/heads/master: 4f63135eb23015a17eaf4f7478deedf63e98ff5c
21 changes: 21 additions & 0 deletions trunk/drivers/net/usb/pegasus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,21 @@ static void check_carrier(struct work_struct *work)
}
}

static int pegasus_blacklisted(struct usb_device *udev)
{
struct usb_device_descriptor *udd = &udev->descriptor;

/* Special quirk to keep the driver from handling the Belkin Bluetooth
* dongle which happens to have the same ID.
*/
if ((udd->idVendor == VENDOR_BELKIN && udd->idProduct == 0x0121) &&
(udd->bDeviceClass == USB_CLASS_WIRELESS_CONTROLLER) &&
(udd->bDeviceProtocol == 1))
return 1;

return 0;
}

static int pegasus_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
Expand All @@ -1296,6 +1311,12 @@ static int pegasus_probe(struct usb_interface *intf,
DECLARE_MAC_BUF(mac);

usb_get_dev(dev);

if (pegasus_blacklisted(dev)) {
res = -ENODEV;
goto out;
}

net = alloc_etherdev(sizeof(struct pegasus));
if (!net) {
dev_err(&intf->dev, "can't allocate %s\n", "device");
Expand Down

0 comments on commit 284e6c5

Please sign in to comment.