From: Ondrej Zary <linux@rainbow-software.org>
To: "Simon Arlott" <simon@fire.lp0.eu>
Cc: "Greg KH" <greg@kroah.com>,
"David Brownell" <dbrownell@users.sourceforge.net>,
netdev@vger.kernel.org,
"Kernel development list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cxacru: ignore cx82310_eth devices
Date: Mon, 6 Sep 2010 15:01:26 +0200 [thread overview]
Message-ID: <201009061501.28037.linux@rainbow-software.org> (raw)
In-Reply-To: <cc069c0375a79353917235d6bf5890821f075cad@8b5064a13e22126c1b9329f0dc35b8915774b7c3.invalid>
On Monday 06 September 2010, Simon Arlott wrote:
> On Sun, September 5, 2010 22:04, Greg KH wrote:
> > On Sun, Sep 05, 2010 at 10:12:33PM +0200, Ondrej Zary wrote:
> >> Ignore ADSL routers, which can have the same vendor and product IDs
> >> as ADSL modems but should be handled by the cx82310_eth driver.
> >>
> >> This intentionally ignores device IDs that aren't currently handled
> >> by cx82310_eth. There may be other device IDs that perhaps shouldn't
> >> be claimed by cxacru.
> >>
> >> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
>
> Missing Signed-off-by: you're modifying my changes.
Oops, sorry for that. I wanted to remove only the line between the
signed-offs...
> >> --- linux-2.6.36-rc3-orig/drivers/usb/atm/cxacru.c 2010-08-29
> >> 17:36:04.000000000 +0200 +++
> >> linux-2.6.36-rc3/drivers/usb/atm/cxacru.c 2010-09-05 18:54:56.000000000
> >> +0200 @@ -1324,8 +1324,22 @@ static struct usbatm_driver cxacru_drive
> >> .tx_padding = 11,
> >> };
> >>
> >> -static int cxacru_usb_probe(struct usb_interface *intf, const struct
> >> usb_device_id *id) -{
> >> +static int cxacru_usb_probe(struct usb_interface *intf,
> >> + const struct usb_device_id *id) {
> >
> > Ick, what?
>
> Sorry, this was my fault. I wasn't thinking when I changed it.
>
> >> + struct usb_device *usb_dev = interface_to_usbdev(intf);
> >> + char buf[15];
> >> +
> >> + /* avoid ADSL routers (cx82310_eth)
> >> + * abort if bDeviceClass is 0xff and iProduct is "USB NET CARD" */
> >> + if (usb_dev->descriptor.bDeviceClass == USB_CLASS_VENDOR_SPEC
> >> + && usb_string(usb_dev, usb_dev->descriptor.iProduct,
> >> + buf, sizeof(buf)) > 0) {
> >> + if (!strcmp(buf, "USB NET CARD")) {
> >> + dev_info(&intf->dev, "ignoring cx82310_eth device\n");
> >> + return -ENODEV;
> >> + }
> >> + }
> >
> > In thinking about this a bit more, don't you also want to check the
> > vendor and product id? You can't always be sure about the string of any
> > old device, right?
>
> This is already checked using the driver's id_table.
>
> I don't know if the vendor and product IDs for the cx82310_eth device
> should be claimed by cxacru or not. Either Conexant are sharing IDs between
> devices, or someone added it without confirming it works. There's no
> comment in the code from 2003 explaining what device it's supposed to be.
> For this reason I'd prefer to ignore all cxacru-claimed devices that appear
> to be an "USB NET CARD", and log that it did so.
Yes, these "USB NET CARD" devices will not work with cxacru either. We don't
lose anything even if they are ignored by cxacru but not claimed by
cx82310_eth. If someone has such device, (s)he can report the IDs to be added
to cx82310_eth.
> The 3 variants of the hardware I have all use an iProduct of "ADSL USB
> MODEM", but I don't want to restrict cxacru to just that in case some
> devices have different values.
--
Ondrej Zary
next prev parent reply other threads:[~2010-09-06 13: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 ` [PATCH] [RFC] cxacru: ignore ADSL routers Ondrej Zary
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 [this message]
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=201009061501.28037.linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=dbrownell@users.sourceforge.net \
--cc=greg@kroah.com \
--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).