Date: Mon, 2 Feb 2009 02:10:32 GMT From: Weongyo Jeong <weongyo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 157016 for review Message-ID: <200902020210.n122AWLU001315@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=157016 Change 157016 by weongyo@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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902020210.n122AWLU001315>