]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: gadget: fix rndis regression
authorDavid Brownell <dbrownell@users.sourceforge.net>
Thu, 26 Mar 2009 18:25:12 +0000 (18:25 +0000)
committerChris Wright <chrisw@sous-sol.org>
Thu, 2 Apr 2009 20:55:16 +0000 (13:55 -0700)
commite6c7f8a29d45054727c7f9334c4a42729af436cd
treee8717e549fe0a2bb6b33ffb4afab1d2f96eb843a
parent7127941c0e5fb2e3c15c4507aeab939e5e686dcd
USB: gadget: fix rndis regression

upstream commit: 090b90118207e786d2990310d063fda5d52cce6e

Restore some code that was wrongly dropped from the RNDIS
driver, and caused interop problems observed with OpenMoko.

The issue is with hardware which needs help conforming to part
of the USB 2.0 spec (section 8.5.3.2); some can automagically
send a ZLP in response to an unexpected IN, but not all chips
will do that.  We don't need to check the packet length ourselves
the way earlier code did, since the UDC must already check it.
But we do need to tell the UDC when it must force a short packet
termination of the data stage.

(Based on a patch from Aric D. Blumer <aric at sdgsystems.com>)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/usb/gadget/f_rndis.c