Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ben Collins and committed by
Jeff Garzik
4f63135e 11a859e5

+21
+21
drivers/net/usb/pegasus.c
··· 1285 1285 } 1286 1286 } 1287 1287 1288 + static 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 + 1288 1303 static int pegasus_probe(struct usb_interface *intf, 1289 1304 const struct usb_device_id *id) 1290 1305 { ··· 1311 1296 DECLARE_MAC_BUF(mac); 1312 1297 1313 1298 usb_get_dev(dev); 1299 + 1300 + if (pegasus_blacklisted(dev)) { 1301 + res = -ENODEV; 1302 + goto out; 1303 + } 1304 + 1314 1305 net = alloc_etherdev(sizeof(struct pegasus)); 1315 1306 if (!net) { 1316 1307 dev_err(&intf->dev, "can't allocate %s\n", "device");