summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/wlan/if_zyd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/wlan/if_zyd.c')
-rw-r--r--sys/dev/usb/wlan/if_zyd.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c
index 6fa07c7..724bfaa 100644
--- a/sys/dev/usb/wlan/if_zyd.c
+++ b/sys/dev/usb/wlan/if_zyd.c
@@ -2449,13 +2449,18 @@ tr_setup:
if (data != NULL)
zyd_tx_free(data, error);
- if (error == USB_ERR_STALLED) {
- /* try to clear stall first */
+ if (error != USB_ERR_CANCELLED) {
+ if (error == USB_ERR_TIMEOUT)
+ device_printf(sc->sc_dev, "device timeout\n");
+
+ /*
+ * Try to clear stall first, also if other
+ * errors occur, hence clearing stall
+ * introduces a 50 ms delay:
+ */
usbd_xfer_set_stall(xfer);
goto tr_setup;
}
- if (error == USB_ERR_TIMEOUT)
- device_printf(sc->sc_dev, "device timeout\n");
break;
}
}
OpenPOWER on IntegriCloud