diff options
author | Maulik Mankad <x0082077@ti.com> | 2009-05-29 09:04:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:46 -0400 |
commit | 830d1b188c997c4af094d4e20b194205ddbded13 (patch) | |
tree | bc48630bde285533656ffd95138de462ab8e8856 /drivers/usb/gadget | |
parent | 1f17c5026ce27d0449903d34f9fca461a45fe1cb (diff) |
USB: gadget : Fix RNDIS code to pass USB Compliance tests (USBCV) with g_ether
This patch fixes a bug in the RNDIS code.
Due to this bug gether_connect() fails as the port remains un-initialized.
As a result following USB Compliance Tests were failing.
(1)EndpointDescriptorTest_DeviceConfigured
(2)Interface Descriptor Test.
(3)Halt Endpoint Test.
(4)SetConfigurationTest
The fix aligns rndis code with the CDC ECM for xxx_set_alt().
The above listed USB Compliance test passes with this fix.
Tested working fine on SDP with OMAP 3430.
Signed-off-by: Maulik Mankad <x0082077@ti.com>
CC: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/f_rndis.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 3279a4726042..424a37c5773f 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c | |||
@@ -475,7 +475,9 @@ static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt) | |||
475 | if (rndis->port.in_ep->driver_data) { | 475 | if (rndis->port.in_ep->driver_data) { |
476 | DBG(cdev, "reset rndis\n"); | 476 | DBG(cdev, "reset rndis\n"); |
477 | gether_disconnect(&rndis->port); | 477 | gether_disconnect(&rndis->port); |
478 | } else { | 478 | } |
479 | |||
480 | if (!rndis->port.in) { | ||
479 | DBG(cdev, "init rndis\n"); | 481 | DBG(cdev, "init rndis\n"); |
480 | rndis->port.in = ep_choose(cdev->gadget, | 482 | rndis->port.in = ep_choose(cdev->gadget, |
481 | rndis->hs.in, rndis->fs.in); | 483 | rndis->hs.in, rndis->fs.in); |