This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
NEC USB patch
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: ecos-patches at sources dot redhat dot com
- Date: Wed, 22 Jan 2003 11:43:21 +0100
- Subject: NEC USB patch
Hi Folks
The USBChecker program from the USB Forum detected a problem with the
USB driver for the NEC upd985xx driver. The test program sends a
configuration request the device cannot handle, so it stalls EP0. This
is correct. But it does start a new receive process for EP0, so all
subsequent messages to ep0 are ignored. This patch adds in the
starting of a new receive process for ep0 after a stall.
Anssi did all the hard work of figuring out what was wrong. I just
wrote 1 line of code and a comment. Hence in the ChangeLog i've given
the credit to Anssi.
Andrew
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/usb/nec_upd985xx/current/ChangeLog,v
retrieving revision 1.4
diff -u -r1.4 ChangeLog
--- ChangeLog 2 Dec 2002 20:48:15 -0000 1.4
+++ ChangeLog 22 Jan 2003 10:37:17 -0000
@@ -1,3 +1,8 @@
+2003-01-22 Anssi Pulkkinen <anssi.pulkkinen@ascom.ch>
+
+ * src/usbs_upd985xx.c (ep0_rx_dsr): After sending a stall response
+ on ep0, start a new receive process for the next control message.
+
2002-12-01 Bart Veer <bartv@ecoscentric.com>
* src/usbs_upd985xx.c, cdl/usbs_upd985xx.cdl:
Index: src/usbs_upd985xx.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/usb/nec_upd985xx/current/src/usbs_upd985xx.c,v
retrieving revision 1.4
diff -u -r1.4 usbs_upd985xx.c
--- src/usbs_upd985xx.c 2 Dec 2002 20:48:45 -0000 1.4
+++ src/usbs_upd985xx.c 22 Jan 2003 10:37:18 -0000
@@ -1502,6 +1502,8 @@
// These stalls will be cleared automaticaly by the next
// setup packet.
*EP0_CR |= (EP0_CR_ISS | EP0_CR_OSS); FLUSH_IBUS();
+ // Start a receive for the next control message
+ ep0_start_rx(8);
} else {
// The control request has been handled. Is there any more
// data to be transferred?