From: Simon Arlott <simon@fire.lp0.eu>
To: Ondrej Zary <linux@rainbow-software.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>,
netdev@vger.kernel.org,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [RFC] introduce cx82310_eth: Conexant CX82310-based ADSL router USB ethernet driver
Date: Sat, 04 Sep 2010 17:12:50 +0100 [thread overview]
Message-ID: <4C827002.6060808@simon.arlott.org.uk> (raw)
In-Reply-To: <201009041357.26215.linux@rainbow-software.org>
On 04/09/10 12:57, Ondrej Zary wrote:
> On Saturday 04 September 2010 00:14:54 Simon Arlott wrote:
>> On 03/09/10 22:17, Ondrej Zary wrote:
>> > + /* send command packet */
>> > + ret = usb_bulk_msg(udev, usb_sndbulkpipe(udev, CMD_EP), buf,
>> > + CMD_PACKET_SIZE, &actual_len, CMD_TIMEOUT);
>>
>> From your previous lsusb output this is an interrupt endpoint, although
>> usb_bulk_msg will auto-detect the type.
>
> There's also usb_interrupt_msg() function but it calls usb_bulk_msg() directly
> so it probably does not matter...
> Otherwise, I already found out that sending interrupt URBs to bulk endpoints
> is a very bad idea (when programming Nexio support for usbtouchscreen). Alan
> Stern then created a patch that checks for this.
I know... it broke cxacru when the device has a bulk command endpoint.
>> >
>> > +#define rx_incomplete (dev->data[0])
>> > +#define rx_remainder (dev->data[1])
>> > +#define incomplete_data (dev->data[2])
>>
>> This doesn't make the rest of the code particularly readable.
>
> I agree. Maybe I should abuse data[0] as a pointer to private data...
> This data[] array does not seem like a good thing. Various usbnet drivers
> abuse it in various ways. It should probably be removed and replaced by one
> priv pointer.
There's driver_priv, added in 2008 and used only by rndis_wlan.
>> > + /* we can send at most 1514 bytes of data (+ 2-byte header) per URB */
>> > + dev->hard_mtu = CX82310_MTU + dev->net->hard_header_len;
>>
>> Have you tried sending larger packets?
>> With another 8 bytes it would support 802.1Q (VLAN).
>
> Larger packets seem to be dropped. No surprise as the router firmware does not
> support VLANs either.
I hadn't considered that it'd need to be able to receive/transmit the
larger packets over the built-in ethernet ports too.
--
Simon Arlott
next prev parent reply other threads:[~2010-09-04 16:12 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 [this message]
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
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=4C827002.6060808@simon.arlott.org.uk \
--to=simon@fire.lp0.eu \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rainbow-software.org \
--cc=netdev@vger.kernel.org \
/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