[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1111191559240.6165-100000@netrider.rowland.org>
Date: Sat, 19 Nov 2011 16:02:24 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: Michal Nazarewicz <mpn@...gle.com>
cc: Greg Kroah-Hartman <gregkh@...e.de>, Felipe Balbi <balbi@...com>,
Thomas Dahlmann <dahlmann.thomas@...or.de>,
Anton Vorontsov <avorontsov@...mvista.com>,
Anatolij Gustschin <agust@...x.de>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Ben Dooks <ben@...tec.co.uk>, Heiko Stubner <heiko@...ech.de>,
Thomas Abraham <thomas.ab@...sung.com>,
<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>
Subject: Re: [PATCH 1/3] usb: udc: Fix gadget driver's speed check in various
UDC drivers
On Sat, 19 Nov 2011, Michal Nazarewicz wrote:
> From: Michal Nazarewicz <mina86@...a86.com>
>
> Several UDC drivers had a gadget driver's speed sanity check of the
> form of:
>
> driver->speed != USB_SPEED_HIGH
>
> or:
>
> driver->speed != USB_SPEED_HIGH && driver->speed != USB_SPEED_FULL
>
> As more and more gadget drivers support USB SuperSpeed, driver->speed
> may be set to USB_SPEED_SUPER and UDC driver should handle such gadget
> correctly. The above checks however fail to recognise USB_SPEED_SUPER
> as a valid speed.
>
> This commit changes the two checks to:
>
> driver->speed < USB_SPEED_HIGH
>
> or:
>
> driver->speed < USB_SPEED_FULL
>
> respectively.
>
> Signed-off-by: Michal Nazarewicz <mina86@...a86.com>
> Reported-by: Alan Stern <stern@...land.harvard.edu>
> ---
>
> I had no way of testing those changes but it appears that those UDC
> drivers check gadget driver's speed only on the entry point and then
> nothing is really dependent on it.
That's right; the idea is merely to avoid connecting at a speed that's
too fast for the gadget driver to handle.
> The only thing that makes me wonder a little is that
> USB_SPEED_WIRELESS will be allowed by the above checks and I'm not
> entirely sure if that's desired (even though that's probably not an
> issue right now).
I agree, wireless will eventually pose a problem. Let's not worry
about it for now, though.
> Nonetheless, this patch needs to get merged to 3.2 as without it
> file_storage won't work on UDC drivers this patch updates.
>
> The next two patches that follow this one are replacements for
> [291a72f8: usb: gadget: replace usb_gadget::is_dualspeed with
> max_speed] and [d93bb846: usb: gadget: rename usb_gadget_driver::speed
> to max_speed] from Felipe's gadget tree, which did not apply correctly
> on top of this patch.
This all looks very good. Thanks for doing the work.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists