From: Ondrej Zary <linux@rainbow-software.org>
To: Simon Arlott <simon@fire.lp0.eu>
Cc: David Brownell <dbrownell@users.sourceforge.net>,
netdev@vger.kernel.org,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: [PATCH] [RFC] cxacru: ignore ADSL routers
Date: Sat, 4 Sep 2010 14:01:07 +0200 [thread overview]
Message-ID: <201009041401.10034.linux@rainbow-software.org> (raw)
In-Reply-To: <4C81735E.3030903@simon.arlott.org.uk>
Ignore ADSL routers, which can have the same vendor and product IDs as ADSL
modems but should be driven by cx82310_eth driver.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
--- linux-2.6.35-rc2/drivers/usb/atm/cxacru.c 2010-06-06 05:43:24.000000000 +0200
+++ linux-2.6.35-rc3/drivers/usb/atm/cxacru.c 2010-09-04 11:54:35.000000000 +0200
@@ -1129,6 +1129,17 @@ static int cxacru_bind(struct usbatm_dat
struct cxacru_data *instance;
struct usb_device *usb_dev = interface_to_usbdev(intf);
int ret;
+ char buf[15];
+
+ /* avoid ADSL routers - abort if bDeviceClass is 0xff and iProduct is "USB NET CARD" */
+ if (usb_dev->descriptor.bDeviceClass == 0xff &&
+ usb_dev->descriptor.iProduct &&
+ usb_string(usb_dev, usb_dev->descriptor.iProduct, buf, sizeof(buf)) &&
+ !strcmp(buf, "USB NET CARD")) {
+ usb_err(usbatm_instance,
+ "probably an ADSL router, use cx82310_eth driver instead\n");
+ return -ENODEV;
+ }
/* instance init */
instance = kzalloc(sizeof(*instance), GFP_KERNEL);
--
Ondrej Zary
next prev parent reply other threads:[~2010-09-04 12:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 21:17 [PATCH] [RFC] introduce cx82310_eth: Conexant CX82310-based ADSL router USB ethernet driver Ondrej Zary
2010-09-03 22:14 ` Simon Arlott
2010-09-04 11:57 ` Ondrej Zary
2010-09-04 16:12 ` Simon Arlott
2010-09-04 12:01 ` Ondrej Zary [this message]
2010-09-04 16:30 ` [PATCH] cxacru: ignore cx82310_eth devices Simon Arlott
2010-09-05 4:03 ` Greg KH
2010-09-05 17:01 ` Ondrej Zary
2010-09-05 19:14 ` Greg KH
2010-09-05 20:12 ` Ondrej Zary
2010-09-05 21:04 ` Greg KH
2010-09-06 11:45 ` Simon Arlott
2010-09-06 13:01 ` Ondrej Zary
2010-09-08 20:56 ` Ondrej Zary
2010-09-08 20:12 ` David Miller
2010-09-08 20:52 ` [PATCH v3] " Ondrej Zary
2010-09-09 3:35 ` Greg KH
2010-09-09 6:07 ` David Miller
2010-09-09 6:25 ` Greg KH
2010-09-09 4:29 ` David Miller
2010-09-04 12:39 ` [PATCH v2] [RFC] introduce cx82310_eth: Conexant CX82310-based ADSL router USB ethernet driver Ondrej Zary
2010-09-08 20:11 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201009041401.10034.linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=simon@fire.lp0.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).