PERFORCE change 157016 for review

Weongyo Jeong weongyo at FreeBSD.org
Sun Feb 1 18:10:33 PST 2009


http://perforce.freebsd.org/chv.cgi?CH=157016

Change 157016 by weongyo at weongyo_ws on 2009/02/02 02:09:32

	when the channel is changed it seems it should flush control pipe not
	just flushing data pipe.  Without this the device sometimes got stuck.

Affected files ...

.. //depot/projects/vap/sys/dev/usb/if_uath.c#8 edit

Differences ...

==== //depot/projects/vap/sys/dev/usb/if_uath.c#8 (text+ko) ====

@@ -2372,6 +2372,18 @@
 		    "could not set led state, error %d\n", error);
 		goto failed;
 	}
+	error = uath_flush(sc);
+	if (error) {
+		device_printf(sc->sc_dev,
+		    "could not flush data pipe, error %d\n", error);
+		goto failed;
+	}
+	error = uath_cmd_write(sc, WDCMSG_FLUSH, NULL, 0, 0);
+	if (error) {
+		device_printf(sc->sc_dev,
+		    "could not flush control pipe, error %d\n", error);
+		goto failed;
+	}
 failed:
 	return (error);
 }
@@ -2455,18 +2467,11 @@
 	    uath_codename(WDCMSG_TARGET_START), be32toh(val));
 	UATH_LOCK(sc);
 
-	error = uath_wme_init(sc);
-	if (error) {
-		device_printf(sc->sc_dev,
-		    "could not setup WME parameters, error %d\n", error);
-		goto fail;
-	}
-
 	/* set default channel */
-	error = uath_set_chan(sc, ic->ic_curchan);
+	error = uath_switch_channel(sc, ic->ic_curchan);
 	if (error) {
 		device_printf(sc->sc_dev,
-		    "could not set channel, error %d\n", error);
+		    "could not switch channel, error %d\n", error);
 		goto fail;
 	}
 


More information about the p4-projects mailing list