diff options
author | Chris Rankin <rankincj@yahoo.com> | 2009-10-13 03:32:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-13 03:35:54 -0400 |
commit | ab854b24a2113ec0c17343e72d22b8876930d0a3 (patch) | |
tree | 454fd81d1afb7fc10542709b46c8f3b92e30e5fe /drivers/net | |
parent | 71fb62fb6dd4ed95e6f0240a2c627df396d9d057 (diff) |
net: Teach pegasus driver to ignore bluetoother adapters with clashing Vendor:Product IDs
The Belkin F8T012xx1 bluetooth adaptor has the same vendor and product
IDs as the Belkin F5D5050, so we need to teach the pegasus driver to
ignore adaptors belonging to the "Wireless" class 0xE0. For this one
case anyway, seeing as pegasus is a driver for "Wired" adaptors.
Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/usb/pegasus.c | 13 | ||||
-rw-r--r-- | drivers/net/usb/pegasus.h | 6 |
2 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 6fdaba8674b9..ed4a508ef262 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -62,8 +62,11 @@ static char *devid=NULL; | |||
62 | static struct usb_eth_dev usb_dev_id[] = { | 62 | static struct usb_eth_dev usb_dev_id[] = { |
63 | #define PEGASUS_DEV(pn, vid, pid, flags) \ | 63 | #define PEGASUS_DEV(pn, vid, pid, flags) \ |
64 | {.name = pn, .vendor = vid, .device = pid, .private = flags}, | 64 | {.name = pn, .vendor = vid, .device = pid, .private = flags}, |
65 | #define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \ | ||
66 | PEGASUS_DEV(pn, vid, pid, flags) | ||
65 | #include "pegasus.h" | 67 | #include "pegasus.h" |
66 | #undef PEGASUS_DEV | 68 | #undef PEGASUS_DEV |
69 | #undef PEGASUS_DEV_CLASS | ||
67 | {NULL, 0, 0, 0}, | 70 | {NULL, 0, 0, 0}, |
68 | {NULL, 0, 0, 0} | 71 | {NULL, 0, 0, 0} |
69 | }; | 72 | }; |
@@ -71,8 +74,18 @@ static struct usb_eth_dev usb_dev_id[] = { | |||
71 | static struct usb_device_id pegasus_ids[] = { | 74 | static struct usb_device_id pegasus_ids[] = { |
72 | #define PEGASUS_DEV(pn, vid, pid, flags) \ | 75 | #define PEGASUS_DEV(pn, vid, pid, flags) \ |
73 | {.match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = vid, .idProduct = pid}, | 76 | {.match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = vid, .idProduct = pid}, |
77 | /* | ||
78 | * The Belkin F8T012xx1 bluetooth adaptor has the same vendor and product | ||
79 | * IDs as the Belkin F5D5050, so we need to teach the pegasus driver to | ||
80 | * ignore adaptors belonging to the "Wireless" class 0xE0. For this one | ||
81 | * case anyway, seeing as the pegasus is for "Wired" adaptors. | ||
82 | */ | ||
83 | #define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \ | ||
84 | {.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_CLASS), \ | ||
85 | .idVendor = vid, .idProduct = pid, .bDeviceClass = dclass}, | ||
74 | #include "pegasus.h" | 86 | #include "pegasus.h" |
75 | #undef PEGASUS_DEV | 87 | #undef PEGASUS_DEV |
88 | #undef PEGASUS_DEV_CLASS | ||
76 | {}, | 89 | {}, |
77 | {} | 90 | {} |
78 | }; | 91 | }; |
diff --git a/drivers/net/usb/pegasus.h b/drivers/net/usb/pegasus.h index f968c834ff63..5d02f0200737 100644 --- a/drivers/net/usb/pegasus.h +++ b/drivers/net/usb/pegasus.h | |||
@@ -202,7 +202,11 @@ PEGASUS_DEV( "AEI USB Fast Ethernet Adapter", VENDOR_AEILAB, 0x1701, | |||
202 | DEFAULT_GPIO_RESET | PEGASUS_II ) | 202 | DEFAULT_GPIO_RESET | PEGASUS_II ) |
203 | PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100, | 203 | PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100, |
204 | DEFAULT_GPIO_RESET | PEGASUS_II ) | 204 | DEFAULT_GPIO_RESET | PEGASUS_II ) |
205 | PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, | 205 | /* |
206 | * Distinguish between this Belkin adaptor and the Belkin bluetooth adaptors | ||
207 | * with the same product IDs by checking the device class too. | ||
208 | */ | ||
209 | PEGASUS_DEV_CLASS( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, 0x00, | ||
206 | DEFAULT_GPIO_RESET | PEGASUS_II ) | 210 | DEFAULT_GPIO_RESET | PEGASUS_II ) |
207 | PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986, | 211 | PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986, |
208 | DEFAULT_GPIO_RESET ) | 212 | DEFAULT_GPIO_RESET ) |