From 38e2bfc94e95dd6005fdaf40dfec0157396741da Mon Sep 17 00:00:00 2001 From: Pete Zaitcev Date: Mon, 18 Sep 2006 22:49:02 -0700 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/irda/irda-usb.c | 18 +++++++----------- drivers/net/wireless/zd1201.c | 4 ++-- 2 files changed, 9 insertions(+), 13 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 2a0d538b387..383cef1f599 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c @@ -671,10 +671,8 @@ static void irda_usb_net_timeout(struct net_device *netdev) * Jean II */ done = 1; break; - case -ECONNABORTED: /* -103 */ - case -ECONNRESET: /* -104 */ - case -ETIMEDOUT: /* -110 */ - case -ENOENT: /* -2 (urb unlinked by us) */ + case -ECONNRESET: + case -ENOENT: /* urb unlinked by us */ default: /* ??? - Play safe */ urb->status = 0; netif_wake_queue(self->netdev); @@ -712,10 +710,8 @@ static void irda_usb_net_timeout(struct net_device *netdev) * Jean II */ done = 1; break; - case -ECONNABORTED: /* -103 */ - case -ECONNRESET: /* -104 */ - case -ETIMEDOUT: /* -110 */ - case -ENOENT: /* -2 (urb unlinked by us) */ + case -ECONNRESET: + case -ENOENT: /* urb unlinked by us */ default: /* ??? - Play safe */ if(skb != NULL) { dev_kfree_skb_any(skb); @@ -845,14 +841,14 @@ static void irda_usb_receive(struct urb *urb, struct pt_regs *regs) self->stats.rx_crc_errors++; /* Also precursor to a hot-unplug on UHCI. */ /* Fallthrough... */ - case -ECONNRESET: /* -104 */ + case -ECONNRESET: /* Random error, if I remember correctly */ /* uhci_cleanup_unlink() is going to kill the Rx * URB just after we return. No problem, at this * point the URB will be idle ;-) - Jean II */ - case -ESHUTDOWN: /* -108 */ + case -ESHUTDOWN: /* That's usually a hot-unplug. Submit will fail... */ - case -ETIMEDOUT: /* -110 */ + case -ETIME: /* Usually precursor to a hot-unplug on OHCI. */ default: self->stats.rx_errors++; diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index c52e9bcf8d0..f50ec10675d 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c @@ -119,7 +119,7 @@ static void zd1201_usbfree(struct urb *urb, struct pt_regs *regs) switch(urb->status) { case -EILSEQ: case -ENODEV: - case -ETIMEDOUT: + case -ETIME: case -ENOENT: case -EPIPE: case -EOVERFLOW: @@ -201,7 +201,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) switch(urb->status) { case -EILSEQ: case -ENODEV: - case -ETIMEDOUT: + case -ETIME: case -ENOENT: case -EPIPE: case -EOVERFLOW: -- cgit v1.2.3