aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorPete Zaitcev <zaitcev@redhat.com>2006-09-19 01:49:02 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:59:00 -0400
commit38e2bfc94e95dd6005fdaf40dfec0157396741da (patch)
tree1cc927239e3369ec7ce4920b1347dd8bc504bb2d /drivers/usb
parentec17cf1cfe0b557210b27313bd584e9b5187d4ca (diff)
USB: Dealias -110 code (more complete)
The purpose of this patch is to split off the case when a device does not reply on the lower level (which is reported by HC hardware), and a case when the device accepted the request, but does not reply at upper level. This redefinition allows to diagnose issues easier, without asking the user if the -110 happened "immediately". The usbmon splits such cases already thanks to its timestamp, but it's not always available. I adjusted all drivers which I found affected (by searching for "urb"). Out of tree drivers may suffer a little bit, but I do not expect much breakage. At worst they may print a few messages. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/isp116x.h2
-rw-r--r--drivers/usb/host/ohci.h2
-rw-r--r--drivers/usb/host/sl811-hcd.c2
-rw-r--r--drivers/usb/input/hid-core.c3
-rw-r--r--drivers/usb/input/itmtouch.c2
-rw-r--r--drivers/usb/input/mtouchusb.c2
-rw-r--r--drivers/usb/input/touchkitusb.c2
-rw-r--r--drivers/usb/input/usbtouchscreen.c2
-rw-r--r--drivers/usb/misc/auerswald.c4
-rw-r--r--drivers/usb/net/pegasus.c2
-rw-r--r--drivers/usb/net/rtl8150.c2
-rw-r--r--drivers/usb/net/usbnet.c12
-rw-r--r--drivers/usb/storage/transport.c5
13 files changed, 19 insertions, 23 deletions
diff --git a/drivers/usb/host/isp116x.h b/drivers/usb/host/isp116x.h
index a1b7c3813d3a..b91e2edd9c5c 100644
--- a/drivers/usb/host/isp116x.h
+++ b/drivers/usb/host/isp116x.h
@@ -233,7 +233,7 @@ static const int cc_to_error[16] = {
233 /* Bit Stuff */ -EPROTO, 233 /* Bit Stuff */ -EPROTO,
234 /* Data Togg */ -EILSEQ, 234 /* Data Togg */ -EILSEQ,
235 /* Stall */ -EPIPE, 235 /* Stall */ -EPIPE,
236 /* DevNotResp */ -ETIMEDOUT, 236 /* DevNotResp */ -ETIME,
237 /* PIDCheck */ -EPROTO, 237 /* PIDCheck */ -EPROTO,
238 /* UnExpPID */ -EPROTO, 238 /* UnExpPID */ -EPROTO,
239 /* DataOver */ -EOVERFLOW, 239 /* DataOver */ -EOVERFLOW,
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index 650d1bf21c1d..93fdc3c35341 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -159,7 +159,7 @@ static const int cc_to_error [16] = {
159 /* Bit Stuff */ -EPROTO, 159 /* Bit Stuff */ -EPROTO,
160 /* Data Togg */ -EILSEQ, 160 /* Data Togg */ -EILSEQ,
161 /* Stall */ -EPIPE, 161 /* Stall */ -EPIPE,
162 /* DevNotResp */ -ETIMEDOUT, 162 /* DevNotResp */ -ETIME,
163 /* PIDCheck */ -EPROTO, 163 /* PIDCheck */ -EPROTO,
164 /* UnExpPID */ -EPROTO, 164 /* UnExpPID */ -EPROTO,
165 /* DataOver */ -EOVERFLOW, 165 /* DataOver */ -EOVERFLOW,
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 8c17da37600b..3a586aab3939 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -597,7 +597,7 @@ done(struct sl811 *sl811, struct sl811h_ep *ep, u8 bank, struct pt_regs *regs)
597 /* error? retry, until "3 strikes" */ 597 /* error? retry, until "3 strikes" */
598 } else if (++ep->error_count >= 3) { 598 } else if (++ep->error_count >= 3) {
599 if (status & SL11H_STATMASK_TMOUT) 599 if (status & SL11H_STATMASK_TMOUT)
600 urbstat = -ETIMEDOUT; 600 urbstat = -ETIME;
601 else if (status & SL11H_STATMASK_OVF) 601 else if (status & SL11H_STATMASK_OVF)
602 urbstat = -EOVERFLOW; 602 urbstat = -EOVERFLOW;
603 else 603 else
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index fc5b662ea177..2a3e9e9b4b3d 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1023,7 +1023,8 @@ static void hid_irq_in(struct urb *urb, struct pt_regs *regs)
1023 return; 1023 return;
1024 case -EILSEQ: /* protocol error or unplug */ 1024 case -EILSEQ: /* protocol error or unplug */
1025 case -EPROTO: /* protocol error or unplug */ 1025 case -EPROTO: /* protocol error or unplug */
1026 case -ETIMEDOUT: /* NAK */ 1026 case -ETIME: /* protocol error or unplug */
1027 case -ETIMEDOUT: /* Should never happen, but... */
1027 clear_bit(HID_IN_RUNNING, &hid->iofl); 1028 clear_bit(HID_IN_RUNNING, &hid->iofl);
1028 hid_io_error(hid); 1029 hid_io_error(hid);
1029 return; 1030 return;
diff --git a/drivers/usb/input/itmtouch.c b/drivers/usb/input/itmtouch.c
index 86acb5f1907a..61966d719ca3 100644
--- a/drivers/usb/input/itmtouch.c
+++ b/drivers/usb/input/itmtouch.c
@@ -87,7 +87,7 @@ static void itmtouch_irq(struct urb *urb, struct pt_regs *regs)
87 case 0: 87 case 0:
88 /* success */ 88 /* success */
89 break; 89 break;
90 case -ETIMEDOUT: 90 case -ETIME:
91 /* this urb is timing out */ 91 /* this urb is timing out */
92 dbg("%s - urb timed out - was the device unplugged?", 92 dbg("%s - urb timed out - was the device unplugged?",
93 __FUNCTION__); 93 __FUNCTION__);
diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c
index a9ccda8810e0..5dce951f2751 100644
--- a/drivers/usb/input/mtouchusb.c
+++ b/drivers/usb/input/mtouchusb.c
@@ -107,7 +107,7 @@ static void mtouchusb_irq(struct urb *urb, struct pt_regs *regs)
107 case 0: 107 case 0:
108 /* success */ 108 /* success */
109 break; 109 break;
110 case -ETIMEDOUT: 110 case -ETIME:
111 /* this urb is timing out */ 111 /* this urb is timing out */
112 dbg("%s - urb timed out - was the device unplugged?", 112 dbg("%s - urb timed out - was the device unplugged?",
113 __FUNCTION__); 113 __FUNCTION__);
diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c
index 0149043ffb97..30b9f820e7a8 100644
--- a/drivers/usb/input/touchkitusb.c
+++ b/drivers/usb/input/touchkitusb.c
@@ -201,7 +201,7 @@ static void touchkit_irq(struct urb *urb, struct pt_regs *regs)
201 case 0: 201 case 0:
202 /* success */ 202 /* success */
203 break; 203 break;
204 case -ETIMEDOUT: 204 case -ETIME:
205 /* this urb is timing out */ 205 /* this urb is timing out */
206 dbg("%s - urb timed out - was the device unplugged?", 206 dbg("%s - urb timed out - was the device unplugged?",
207 __FUNCTION__); 207 __FUNCTION__);
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c
index a1be7840ea02..4640d1000d83 100644
--- a/drivers/usb/input/usbtouchscreen.c
+++ b/drivers/usb/input/usbtouchscreen.c
@@ -508,7 +508,7 @@ static void usbtouch_irq(struct urb *urb, struct pt_regs *regs)
508 case 0: 508 case 0:
509 /* success */ 509 /* success */
510 break; 510 break;
511 case -ETIMEDOUT: 511 case -ETIME:
512 /* this urb is timing out */ 512 /* this urb is timing out */
513 dbg("%s - urb timed out - was the device unplugged?", 513 dbg("%s - urb timed out - was the device unplugged?",
514 __FUNCTION__); 514 __FUNCTION__);
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 4a329d8488b7..4fd2110b3411 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -806,7 +806,7 @@ static void auerbuf_releasebuf( pauerbuf_t bp)
8060 Initial, OK 8060 Initial, OK
807-EINPROGRESS during submission until end 807-EINPROGRESS during submission until end
808-ENOENT if urb is unlinked 808-ENOENT if urb is unlinked
809-ETIMEDOUT Transfer timed out, NAK 809-ETIME Device did not respond
810-ENOMEM Memory Overflow 810-ENOMEM Memory Overflow
811-ENODEV Specified USB-device or bus doesn't exist 811-ENODEV Specified USB-device or bus doesn't exist
812-ENXIO URB already queued 812-ENXIO URB already queued
@@ -832,7 +832,7 @@ static int auerswald_status_retry (int status)
832{ 832{
833 switch (status) { 833 switch (status) {
834 case 0: 834 case 0:
835 case -ETIMEDOUT: 835 case -ETIME:
836 case -EOVERFLOW: 836 case -EOVERFLOW:
837 case -EAGAIN: 837 case -EAGAIN:
838 case -EPIPE: 838 case -EPIPE:
diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
index ab21f960d255..b8e25af13f02 100644
--- a/drivers/usb/net/pegasus.c
+++ b/drivers/usb/net/pegasus.c
@@ -619,7 +619,7 @@ static void read_bulk_callback(struct urb *urb, struct pt_regs *regs)
619 switch (urb->status) { 619 switch (urb->status) {
620 case 0: 620 case 0:
621 break; 621 break;
622 case -ETIMEDOUT: 622 case -ETIME:
623 if (netif_msg_rx_err(pegasus)) 623 if (netif_msg_rx_err(pegasus))
624 pr_debug("%s: reset MAC\n", net->name); 624 pr_debug("%s: reset MAC\n", net->name);
625 pegasus->flags &= ~PEGASUS_RX_BUSY; 625 pegasus->flags &= ~PEGASUS_RX_BUSY;
diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c
index a72685b96061..2364c2099387 100644
--- a/drivers/usb/net/rtl8150.c
+++ b/drivers/usb/net/rtl8150.c
@@ -438,7 +438,7 @@ static void read_bulk_callback(struct urb *urb, struct pt_regs *regs)
438 break; 438 break;
439 case -ENOENT: 439 case -ENOENT:
440 return; /* the urb is in unlink state */ 440 return; /* the urb is in unlink state */
441 case -ETIMEDOUT: 441 case -ETIME:
442 warn("may be reset is needed?.."); 442 warn("may be reset is needed?..");
443 goto goon; 443 goto goon;
444 default: 444 default:
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index 8e8e74d40530..98a522f1e264 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -425,9 +425,9 @@ static void rx_complete (struct urb *urb, struct pt_regs *regs)
425 // we get controller i/o faults during khubd disconnect() delays. 425 // we get controller i/o faults during khubd disconnect() delays.
426 // throttle down resubmits, to avoid log floods; just temporarily, 426 // throttle down resubmits, to avoid log floods; just temporarily,
427 // so we still recover when the fault isn't a khubd delay. 427 // so we still recover when the fault isn't a khubd delay.
428 case -EPROTO: // ehci 428 case -EPROTO:
429 case -ETIMEDOUT: // ohci 429 case -ETIME:
430 case -EILSEQ: // uhci 430 case -EILSEQ:
431 dev->stats.rx_errors++; 431 dev->stats.rx_errors++;
432 if (!timer_pending (&dev->delay)) { 432 if (!timer_pending (&dev->delay)) {
433 mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES); 433 mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES);
@@ -821,9 +821,9 @@ static void tx_complete (struct urb *urb, struct pt_regs *regs)
821 821
822 // like rx, tx gets controller i/o faults during khubd delays 822 // like rx, tx gets controller i/o faults during khubd delays
823 // and so it uses the same throttling mechanism. 823 // and so it uses the same throttling mechanism.
824 case -EPROTO: // ehci 824 case -EPROTO:
825 case -ETIMEDOUT: // ohci 825 case -ETIME:
826 case -EILSEQ: // uhci 826 case -EILSEQ:
827 if (!timer_pending (&dev->delay)) { 827 if (!timer_pending (&dev->delay)) {
828 mod_timer (&dev->delay, 828 mod_timer (&dev->delay,
829 jiffies + THROTTLE_JIFFIES); 829 jiffies + THROTTLE_JIFFIES);
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index d6acc92a4ae3..f23514c4e649 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -294,11 +294,6 @@ static int interpret_urb_result(struct us_data *us, unsigned int pipe,
294 return USB_STOR_XFER_ERROR; 294 return USB_STOR_XFER_ERROR;
295 return USB_STOR_XFER_STALLED; 295 return USB_STOR_XFER_STALLED;
296 296
297 /* timeout or excessively long NAK */
298 case -ETIMEDOUT:
299 US_DEBUGP("-- timeout or NAK\n");
300 return USB_STOR_XFER_ERROR;
301
302 /* babble - the device tried to send more than we wanted to read */ 297 /* babble - the device tried to send more than we wanted to read */
303 case -EOVERFLOW: 298 case -EOVERFLOW:
304 US_DEBUGP("-- babble\n"); 299 US_DEBUGP("-- babble\n");