* [PATCH] (Revised) USB VID/PID clash between pegasus and hci_usb drivers
@ 2008-01-04 11:07 Chris Rankin
2008-01-04 12:45 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Chris Rankin @ 2008-01-04 11:07 UTC (permalink / raw)
To: netdev; +Cc: marcel, greg
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
Hi,
I have surprisingly managed to track down the USB device descriptor for the wired Belkin network
adapter, and it looks as if the device class is actually 0x00 instead of 0xFF. I originally used
0xFF because that is what my 3com device used (for some reason) and so I was hoping that Belkin
would also use 0xFF for the same reason.
But anyway, here is the new patch.
Cheers,
Chris
__________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 984420339-PEGASUS.diff --]
[-- Type: text/x-patch; name="PEGASUS.diff", Size: 2220 bytes --]
--- linux-2.6.23/drivers/net/usb/pegasus.h.orig 2007-12-31 12:54:44.000000000 +0000
+++ linux-2.6.23/drivers/net/usb/pegasus.h 2007-12-31 13:06:18.000000000 +0000
@@ -202,8 +202,12 @@
DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100,
DEFAULT_GPIO_RESET | PEGASUS_II )
-PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121,
- DEFAULT_GPIO_RESET | PEGASUS_II )
+/*
+ * Distinguish between this Belkin adaptor and the Belkin bluetooth adaptors
+ * with the same product IDs by checking the device class too.
+ */
+PEGASUS_DEV_CLASS( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, 0x00,
+ DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986,
DEFAULT_GPIO_RESET )
PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987,
--- linux-2.6.23/drivers/net/usb/pegasus.c.orig 2007-12-31 12:54:44.000000000 +0000
+++ linux-2.6.23/drivers/net/usb/pegasus.c 2007-12-31 13:04:35.000000000 +0000
@@ -62,8 +62,11 @@
static struct usb_eth_dev usb_dev_id[] = {
#define PEGASUS_DEV(pn, vid, pid, flags) \
{.name = pn, .vendor = vid, .device = pid, .private = flags},
+#define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \
+ PEGASUS_DEV(pn, vid, pid, flags)
#include "pegasus.h"
#undef PEGASUS_DEV
+#undef PEGASUS_DEV_CLASS
{NULL, 0, 0, 0},
{NULL, 0, 0, 0}
};
@@ -71,8 +74,18 @@
static struct usb_device_id pegasus_ids[] = {
#define PEGASUS_DEV(pn, vid, pid, flags) \
{.match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = vid, .idProduct = pid},
+/*
+ * 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 the pegasus is for "Wired" adaptors.
+ */
+#define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \
+ {.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_CLASS), \
+ .idVendor = vid, .idProduct = pid, .bDeviceClass = dclass},
#include "pegasus.h"
#undef PEGASUS_DEV
+#undef PEGASUS_DEV_CLASS
{},
{}
};
Signed-off-by: Chris Rankin <rankincj@yahoo.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] (Revised) USB VID/PID clash between pegasus and hci_usb drivers
2008-01-04 11:07 [PATCH] (Revised) USB VID/PID clash between pegasus and hci_usb drivers Chris Rankin
@ 2008-01-04 12:45 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2008-01-04 12:45 UTC (permalink / raw)
To: Chris Rankin; +Cc: netdev, greg
Hi Chris,
> I have surprisingly managed to track down the USB device descriptor for the wired Belkin network
> adapter, and it looks as if the device class is actually 0x00 instead of 0xFF. I originally used
> 0xFF because that is what my 3com device used (for some reason) and so I was hoping that Belkin
> would also use 0xFF for the same reason.
can you please follow Documentation/SubmittingPatches. The commit
message should explain why this is needed and why this change is the
best choice.
The patch itself is Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-04 12:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 11:07 [PATCH] (Revised) USB VID/PID clash between pegasus and hci_usb drivers Chris Rankin
2008-01-04 12:45 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).