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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ec17cf1cfe
commit
38e2bfc94e
@ -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++;
|
||||
|
Reference in New Issue
Block a user