* [PATCH] Enhanced matching code for pegasus driver (was blacklist support)
@ 2008-04-10 22:27 Stefan Bader
0 siblings, 0 replies; only message in thread
From: Stefan Bader @ 2008-04-10 22:27 UTC (permalink / raw)
To: linux-usb, netdev; +Cc: Petko Manolov
[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]
I have reworked the patch from using a blacklist to using the enhanced
matching macros. While certainly going into the right direction I got
one problem: although this certainly will prevent the bluetooth adapter
from loading I cannot tell (due to missing hardware) whether this will
not prevent the ethernet dongle from working.
So question is a) does the approach look good and b) has somebode a
Belkin usb ethernet adapter to verify the class, subclass and protocol?
Regards,
Stefan
> I have been working on a problem which arose from the fact that (at
> least one vendor) some vendors use the same vendor and model number for
> different pieces of hardware.
> In this case the Belkin bluetooth dongle uses the same numbers as the
> network adapter which causes machines to lock up as soon as the
> bluetooth dongle gets inserted.
> As far as I found there had been discussions about adding some sort of
> blacklisting support to the pegasus module before but I have not found
> any code doing so.
> This is what the attached patch does. There is possibly much room for
> improvement but at least it seems to work. Would it be possible to
> include something like this in the mainline driver?
[-- Attachment #2: pegasus4.diff --]
[-- Type: text/x-diff, Size: 1735 bytes --]
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index d1ed68a..61f4f72 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -62,17 +62,23 @@ static char *devid=NULL;
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_DEVINT(pn, vid, pid, flags, cl, sc, pr) \
+ PEGASUS_DEV(pn, vid, pid, flags)
#include "pegasus.h"
#undef PEGASUS_DEV
+#undef PEGASUS_DEVINT
{NULL, 0, 0, 0},
{NULL, 0, 0, 0}
};
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},
+ {USB_DEVICE(vid, pid)},
+#define PEGASUS_DEVINT(pn, vid, pid, flags, cl, sc, pr) \
+ {USB_DEVICE_AND_INTERFACE_INFO(vid, pid, cl, sc, pr)},
#include "pegasus.h"
#undef PEGASUS_DEV
+#undef PEGASUS_DEVINT
{},
{}
};
diff --git a/drivers/net/usb/pegasus.h b/drivers/net/usb/pegasus.h
index c746782..a7000ed 100644
--- a/drivers/net/usb/pegasus.h
+++ b/drivers/net/usb/pegasus.h
@@ -202,8 +202,8 @@ PEGASUS_DEV( "AEI USB Fast Ethernet Adapter", VENDOR_AEILAB, 0x1701,
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 )
+PEGASUS_DEVINT( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121,
+ DEFAULT_GPIO_RESET | PEGASUS_II, 0xff, 0xff, 0xff )
PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986,
DEFAULT_GPIO_RESET )
PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987,
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-10 22:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-10 22:27 [PATCH] Enhanced matching code for pegasus driver (was blacklist support) Stefan Bader
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.