Update of /cvsroot/gc-linux/linux/drivers/usb/host
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28930/drivers/usb/host
Modified Files:
rvl-sthcd.c
Log Message:
Apply:
gc-linux+fix_cputable-2.6.27.patch
gcnfb+fix_mmap-2.6.27.patch
usbgecko_udbg+safeness.patch
rvl-sthcd+workaround_7005.patch
Index: rvl-sthcd.c
===================================================================
RCS file: /cvsroot/gc-linux/linux/drivers/usb/host/rvl-sthcd.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- rvl-sthcd.c 15 Nov 2008 20:10:15 -0000 1.3
+++ rvl-sthcd.c 25 Nov 2008 19:09:31 -0000 1.4
@@ -78,7 +78,7 @@
#define STHCD_MAX_CHUNK_SIZE (2048)
#define STHCD_PORT_MAX_RESETS 2 /* maximum number of consecutive
- * allowed for a port */
+ * resets allowed for a port */
#define STHCD_RESCAN_INTERVAL 5 /* seconds */
#define starlet_ioh_sg_entry(sg, ptr) \
@@ -1064,7 +1064,7 @@
status = xfer_len;
xfer_len = 0;
- if (status != -7004 && status != -7003) {
+ if (status != -7004 && status != -7003 && status != -7005) {
drv_printk(KERN_ERR, "request completed"
" with error %d\n", status);
sthcd_pep_print(pep);
@@ -1077,8 +1077,8 @@
status = -EPIPE;
break;
case -7005:
- /* endpoint shutdown? */
- status = -ESHUTDOWN;
+ /* nak? */
+ status = -ECONNRESET;
break;
case -7008:
case -7022:
@@ -1768,6 +1768,7 @@
char pathname[32];
struct usb_device_descriptor *descriptor;
int fd;
+ int i;
int retval;
descriptor = starlet_ioh_kzalloc(USB_DT_DEVICE_SIZE);
@@ -1785,11 +1786,19 @@
goto done;
}
fd = retval;
- retval = sthcd_usb_control_msg(fd, USB_REQ_GET_DESCRIPTOR,
- USB_DIR_IN,
- USB_DT_DEVICE << 8, 0,
- descriptor, USB_DT_DEVICE_SIZE,
- 0);
+
+ for (i=0; i < 3; i++) {
+ retval = sthcd_usb_control_msg(fd, USB_REQ_GET_DESCRIPTOR,
+ USB_DIR_IN,
+ USB_DT_DEVICE << 8, 0,
+ descriptor, USB_DT_DEVICE_SIZE,
+ 0);
+ if (retval != -7005)
+ break;
+ DBG("%s: attempt %d, retval=%d (%x)\n", __func__,
+ i, retval, retval);
+ }
+
starlet_close(fd);
if (retval >= USB_DT_DEVICE_SIZE) {
|