summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2010-01-29 02:31:33 +0000
committerthompsa <thompsa@FreeBSD.org>2010-01-29 02:31:33 +0000
commitc92d1f05d1ed2e765de5b990d39740b14af3bede (patch)
tree1e8bd5035b8fd732b20f92da0ad139e9da150b9b
parent57e5f62185c51cff7059636afebeacfa2786ad46 (diff)
downloadFreeBSD-src-c92d1f05d1ed2e765de5b990d39740b14af3bede.zip
FreeBSD-src-c92d1f05d1ed2e765de5b990d39740b14af3bede.tar.gz
Attempt to recover on a TX error rather than stopping all transfers.
Submitted by: Hans Petter Selesky
-rw-r--r--sys/dev/usb/wlan/if_rum.c13
-rw-r--r--sys/dev/usb/wlan/if_zyd.c13
2 files changed, 18 insertions, 8 deletions
diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c
index d4103bc..0cd394d 100644
--- a/sys/dev/usb/wlan/if_rum.c
+++ b/sys/dev/usb/wlan/if_rum.c
@@ -845,13 +845,18 @@ tr_setup:
usbd_xfer_set_priv(xfer, NULL);
}
- 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;
}
}
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