diff options
author | Ben Collins <ben.collins@canonical.com> | 2008-07-30 23:39:02 +0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-07 10:21:26 +0400 |
commit | 4f63135eb23015a17eaf4f7478deedf63e98ff5c (patch) | |
tree | f463e89229cced112cea96699da36454f06679cc /drivers/net/usb | |
parent | 11a859e591befae7413505c68dd241ad8e14748c (diff) | |
download | linux-4f63135eb23015a17eaf4f7478deedf63e98ff5c.tar.xz |
pegasus: add blacklist support to fix Belkin bluetooth dongle.
Reference: https://launchpad.net/bugs/140511
The Belkin bluetooth dongle unfortunately shares the vendor and device id
with the network adapter which causes lockups whenever the bluetooth
dongle is inserted.
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Ben Collins <ben.collins@canonical.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/pegasus.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index b588c890ea70..a84ba487c713 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) } } +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) { @@ -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"); |