ChangeSet 1.1743.3.7, 2004/05/24 17:05:26-07:00, david-b@pacbell.net

[PATCH] USB: PXA 2xx UDC and RNDIS g_ether

I noticed some problems with the PXA 2xx UDC and the
RNDIS version of the ethernet-over-usb link:

  - Static linking needs more than just two endpoints now

  - The endpoint autoconfig misbehaves (sounds like what
    Stefan reported a couple weeks ago)

This patch fixes those two problems, though there are
a couple others lurking too.


 drivers/usb/gadget/Kconfig      |    1 +
 drivers/usb/gadget/epautoconf.c |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)


diff -Nru a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
--- a/drivers/usb/gadget/Kconfig	Fri May 28 14:41:21 2004
+++ b/drivers/usb/gadget/Kconfig	Fri May 28 14:41:21 2004
@@ -95,6 +95,7 @@
 config USB_PXA2XX_SMALL
 	depends on USB_GADGET_PXA2XX
 	bool
+	default n if USB_ETH_RNDIS
 	default y if USB_ZERO
 	default y if USB_ETH
 	default y if USB_G_SERIAL
diff -Nru a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
--- a/drivers/usb/gadget/epautoconf.c	Fri May 28 14:41:21 2004
+++ b/drivers/usb/gadget/epautoconf.c	Fri May 28 14:41:21 2004
@@ -96,7 +96,8 @@
 				/* for now, avoid PXA "interrupt-in";
 				 * it's documented as never using DATA1.
 				 */
-				if (gadget_is_pxa (gadget))
+				if (gadget_is_pxa (gadget)
+						&& 'i' == tmp [1])
 					return 0;
 				break;
 			case USB_ENDPOINT_XFER_BULK:
