Daniele Ziglioli ha scritto:
a long awaited (for us) usb patch ...
- 20 -> 50 ms reset delay (some deviced was not correctly detected
otherwise)
From the Cypress manual (just the last version!):
"When a device is detected, the first thing that to do is to send
it a USB Reset to force it into
its default address of zero. The USB 2.0 specification states that
for a root hub a device
must be reset for a minimum of 50 mS."
- driver version info added
PS:
the solution should be correct for sl811.c also driver, but I've no
way to test it.
oops, the patch is here .
--
Daniele Ziglioli
Signal S.r.l.
--- ../../hc_sl811.c.cvs 2007-07-24 10:23:42.000000000 +0200
+++ linux-2.4.x/drivers/usb/host/hc_sl811.c 2007-07-24 10:26:30.000000000 +0200
@@ -8,6 +8,15 @@
*
* ! This driver have end of live! Please use hcd/sl811.c instead !
*
+ *
+ * 24.07.2007 Ver. 1.01 DZ
+ * - 20 -> 50 ms reset delay (some deviced was not correctly detected otherwise)
+ * From the Cypress manual:
+ * "When a device is detected, the first thing that to do is to send it a USB Reset to force it into
+ * its default address of zero. The USB 2.0 specification states that for a root hub a device
+ * must be reset for a minimum of 50 mS."
+ * - driver version info added
+ *
* 06.05.2005 DZ,LC
* - Support COLDFIRE architecture now.
* - restore previus "Read back SOF counter HIGH" in hc_add_trans(),
@@ -72,14 +81,15 @@
#include <linux/usb.h>
#define MODNAME "HC_SL811"
+#define MODVER "1.01"
#undef HC_URB_TIMEOUT
#undef HC_SWITCH_INT
#undef HC_ENABLE_ISOC
-// #define SL811_DEBUG
+//#define SL811_DEBUG
#define SL811_DEBUG_ERR
-// #define SL811_DEBUG_IRQ
+//#define SL811_DEBUG_IRQ
// #define SL811_DEBUG_VERBOSE
#ifdef SL811_DEBUG_ERR
@@ -341,7 +351,7 @@
// setup master and full speed
SL811Write (hci, SL11H_CTLREG1, 0x08); // reset USB
- mdelay (20); // 20ms
+ mdelay (50); // 50ms
SL811Write (hci, SL11H_CTLREG1, 0); // remove SE0
/* disable all interrupts (18.09.2003) */
@@ -379,7 +389,7 @@
DBG ("USBReset: low speed Device attached %03X\n", hci->hp.hcport);
SL811Write (hci, SL11H_CTLREG1, 0x8);
- mdelay (20);
+ mdelay (50); // 50ms
// SL811Write (hci, SL11H_SOFTMRREG, 0xee); /* the same, but better reading (hne) */
SL811Write (hci, SL11H_CTLREG2, 0xee);
SL811Write (hci, SL11H_CTLREG1, 0x21);
@@ -392,7 +402,7 @@
DBG ("USBReset: full speed Device attached %03X \n", hci->hp.hcport);
SL811Write (hci, SL11H_CTLREG1, 0x8);
- mdelay (20);
+ mdelay (50); // 50ms
// SL811Write (hci, SL11H_SOFTMRREG, 0xae); /* the same, but better reading (hne) */
SL811Write (hci, SL11H_CTLREG2, 0xae);
SL811Write (hci, SL11H_CTLREG1, 0x01);
@@ -1398,7 +1408,7 @@
}
hp->irq = irq;
- printk (KERN_INFO __FILE__ ": USB SL811 at %x,%x, IRQ %d\n",
+ printk (KERN_INFO __FILE__ ": USB SL811 Ver. %s at %x,%x, IRQ %d\n", MODVER,
hp->hcport, hp->hcport2, irq);
#ifdef SL811_DEBUG_VERBOSE
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev