diff options
author | Pete Zaitcev <zaitcev@redhat.com> | 2006-09-19 01:49:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-27 14:59:00 -0400 |
commit | 38e2bfc94e95dd6005fdaf40dfec0157396741da (patch) | |
tree | 1cc927239e3369ec7ce4920b1347dd8bc504bb2d /drivers/net/irda/irda-usb.c | |
parent | ec17cf1cfe0b557210b27313bd584e9b5187d4ca (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/net/irda/irda-usb.c')
-rw-r--r-- | drivers/net/irda/irda-usb.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 2a0d538b387f..383cef1f5999 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) | |||
671 | * Jean II */ | 671 | * Jean II */ |
672 | done = 1; | 672 | done = 1; |
673 | break; | 673 | break; |
674 | case -ECONNABORTED: /* -103 */ | 674 | case -ECONNRESET: |
675 | case -ECONNRESET: /* -104 */ | 675 | case -ENOENT: /* urb unlinked by us */ |
676 | case -ETIMEDOUT: /* -110 */ | ||
677 | case -ENOENT: /* -2 (urb unlinked by us) */ | ||
678 | default: /* ??? - Play safe */ | 676 | default: /* ??? - Play safe */ |
679 | urb->status = 0; | 677 | urb->status = 0; |
680 | netif_wake_queue(self->netdev); | 678 | netif_wake_queue(self->netdev); |
@@ -712,10 +710,8 @@ static void irda_usb_net_timeout(struct net_device *netdev) | |||
712 | * Jean II */ | 710 | * Jean II */ |
713 | done = 1; | 711 | done = 1; |
714 | break; | 712 | break; |
715 | case -ECONNABORTED: /* -103 */ | 713 | case -ECONNRESET: |
716 | case -ECONNRESET: /* -104 */ | 714 | case -ENOENT: /* urb unlinked by us */ |
717 | case -ETIMEDOUT: /* -110 */ | ||
718 | case -ENOENT: /* -2 (urb unlinked by us) */ | ||
719 | default: /* ??? - Play safe */ | 715 | default: /* ??? - Play safe */ |
720 | if(skb != NULL) { | 716 | if(skb != NULL) { |
721 | dev_kfree_skb_any(skb); | 717 | dev_kfree_skb_any(skb); |
@@ -845,14 +841,14 @@ static void irda_usb_receive(struct urb *urb, struct pt_regs *regs) | |||
845 | self->stats.rx_crc_errors++; | 841 | self->stats.rx_crc_errors++; |
846 | /* Also precursor to a hot-unplug on UHCI. */ | 842 | /* Also precursor to a hot-unplug on UHCI. */ |
847 | /* Fallthrough... */ | 843 | /* Fallthrough... */ |
848 | case -ECONNRESET: /* -104 */ | 844 | case -ECONNRESET: |
849 | /* Random error, if I remember correctly */ | 845 | /* Random error, if I remember correctly */ |
850 | /* uhci_cleanup_unlink() is going to kill the Rx | 846 | /* uhci_cleanup_unlink() is going to kill the Rx |
851 | * URB just after we return. No problem, at this | 847 | * URB just after we return. No problem, at this |
852 | * point the URB will be idle ;-) - Jean II */ | 848 | * point the URB will be idle ;-) - Jean II */ |
853 | case -ESHUTDOWN: /* -108 */ | 849 | case -ESHUTDOWN: |
854 | /* That's usually a hot-unplug. Submit will fail... */ | 850 | /* That's usually a hot-unplug. Submit will fail... */ |
855 | case -ETIMEDOUT: /* -110 */ | 851 | case -ETIME: |
856 | /* Usually precursor to a hot-unplug on OHCI. */ | 852 | /* Usually precursor to a hot-unplug on OHCI. */ |
857 | default: | 853 | default: |
858 | self->stats.rx_errors++; | 854 | self->stats.rx_errors++; |