svn commit: r206294 - stable/8/sys/dev/usb/wlan

Andrew Thompson thompsa at FreeBSD.org
Tue Apr 6 23:17:14 UTC 2010


Author: thompsa
Date: Tue Apr  6 23:17:13 2010
New Revision: 206294
URL: http://svn.freebsd.org/changeset/base/206294

Log:
  MFC r203141
  
   Attempt to recover on a TX error rather than stopping all transfers.
  
  Submitted by:	Hans Petter Selesky

Modified:
  stable/8/sys/dev/usb/wlan/if_rum.c
  stable/8/sys/dev/usb/wlan/if_zyd.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/usb/wlan/if_rum.c
==============================================================================
--- stable/8/sys/dev/usb/wlan/if_rum.c	Tue Apr  6 23:16:40 2010	(r206293)
+++ stable/8/sys/dev/usb/wlan/if_rum.c	Tue Apr  6 23:17:13 2010	(r206294)
@@ -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;
 	}
 }

Modified: stable/8/sys/dev/usb/wlan/if_zyd.c
==============================================================================
--- stable/8/sys/dev/usb/wlan/if_zyd.c	Tue Apr  6 23:16:40 2010	(r206293)
+++ stable/8/sys/dev/usb/wlan/if_zyd.c	Tue Apr  6 23:17:13 2010	(r206294)
@@ -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;
 	}
 }


More information about the svn-src-stable mailing list