Skip to content

Commit

Permalink
USB: gadget : Fix RNDIS code to pass USB Compliance tests (USBCV) wit…
Browse files Browse the repository at this point in the history
…h 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>
  • Loading branch information
Maulik Mankad authored and Greg Kroah-Hartman committed Jun 16, 2009
1 parent 1f17c50 commit 830d1b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/gadget/f_rndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,9 @@ static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
if (rndis->port.in_ep->driver_data) {
DBG(cdev, "reset rndis\n");
gether_disconnect(&rndis->port);
} else {
}

if (!rndis->port.in) {
DBG(cdev, "init rndis\n");
rndis->port.in = ep_choose(cdev->gadget,
rndis->hs.in, rndis->fs.in);
Expand Down

0 comments on commit 830d1b1

Please sign in to comment.