pegasus: add blacklist support to fix Belkin bluetooth dongle.
Subsystems (4)
PATCH 9/12 pegasus: add blacklist support to fix Belkin bluetooth dongle.
From: Ben Collins <[email protected]>
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.
---
drivers/net/usb/pegasus.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/net/usb/pegasus.c renamed from drivers/net/usb/pegasus.c~pegasus-add-blacklist-support-to-fix-belkin-bluetooth-dongle +21 -0
@@ -1285,6 +1285,21 @@ static void check_carrier(struct work_st } } +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_inteDECLARE_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" );
_
Jeff Garzik
AppliedQuoted 45 lines · [email protected] wrote:
From: Ben Collins <[email protected]>
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 <[email protected]>Signed-off-by Ben Collins <[email protected]>Cc Jeff Garzik <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc David Brownell <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/net/usb/pegasus.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)diff -puN
drivers/net/usb/pegasus.c~pegasus-add-blacklist-support-to-fix-belkin-bluetooth-dongledrivers/net/usb/pegasus.cdrivers/net/usb/pegasus.c renamed from drivers/net/usb/pegasus.c~pegasus-add-blacklist-support-to-fix-belkin-bluetooth-dongle +15
-0@@ -1285,6 +1285,21 @@ static void check_carrier(struct work_st } } +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) {
drivers/net/usb/pegasus.c static int pegasus_probe(struct usb_inte · line 1319
Quoted 9 lines
drivers/net/usb/pegasus.c renamed from drivers/net/usb/pegasus.c~pegasus-add-blacklist-support-to-fix-belkin-bluetooth-dongle +6
-0@@ -1296,6 +1311,12 @@ static int pegasus_probe(struct usb_inteDECLARE_MAC_BUF (mac);usb_get_dev (dev); + +if (pegasus_blacklisted (dev)) { + res = -ENODEV ; + goto out; + } +
applied