Date: Sat, 13 Sep 2008 18:04:52 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 149720 for review Message-ID: <200809131804.m8DI4qaR073228@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=149720 Change 149720 by hselasky@hselasky_laptop001 on 2008/09/13 18:04:00 Fix some issues popping up while testing. 1) Need to call rint_done in the TTY layer. 2) The config TD check gone needs to be called locked. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/serial/usb2_serial.c#11 edit .. //depot/projects/usb/src/sys/dev/usb2/wlan/if_rum2.c#11 edit .. //depot/projects/usb/src/sys/dev/usb2/wlan/if_ural2.c#11 edit .. //depot/projects/usb/src/sys/dev/usb2/wlan/if_zyd2.c#12 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/serial/usb2_serial.c#11 (text+ko) ==== @@ -1048,6 +1048,9 @@ (!(sc->sc_flag & UCOM_FLAG_GP_DATA))) { return; /* multiport device polling */ } + if (len == 0) + return; /* no data */ + /* set a flag to prevent recursation ? */ while (len > 0) { @@ -1084,6 +1087,7 @@ } } } + ttydisc_rint_done(tp); return; } ==== //depot/projects/usb/src/sys/dev/usb2/wlan/if_rum2.c#11 (text+ko) ==== @@ -1535,15 +1535,16 @@ DPRINTF("setting new state: %d\n", nstate); + mtx_lock(&sc->sc_mtx); if (usb2_config_td_is_gone(&sc->sc_config_td)) { + mtx_unlock(&sc->sc_mtx); + /* Special case which happens at detach. */ if (nstate == IEEE80211_S_INIT) { (uvp->newstate) (vap, nstate, arg); } return (0); /* nothing to do */ } - mtx_lock(&sc->sc_mtx); - /* store next state */ sc->sc_ns_state = nstate; sc->sc_ns_arg = arg; ==== //depot/projects/usb/src/sys/dev/usb2/wlan/if_ural2.c#11 (text+ko) ==== @@ -1526,15 +1526,16 @@ DPRINTF("setting new state: %d\n", nstate); + mtx_lock(&sc->sc_mtx); if (usb2_config_td_is_gone(&sc->sc_config_td)) { + mtx_unlock(&sc->sc_mtx); + /* Special case which happens at detach. */ if (nstate == IEEE80211_S_INIT) { (uvp->newstate) (vap, nstate, arg); } return (0); /* nothing to do */ } - mtx_lock(&sc->sc_mtx); - /* store next state */ sc->sc_ns_state = nstate; sc->sc_ns_arg = arg; ==== //depot/projects/usb/src/sys/dev/usb2/wlan/if_zyd2.c#12 (text+ko) ==== @@ -2140,15 +2140,15 @@ DPRINTF("setting new state: %d\n", nstate); + mtx_lock(&sc->sc_mtx); if (usb2_config_td_is_gone(&sc->sc_config_td)) { + mtx_unlock(&sc->sc_mtx); /* Special case which happens at detach. */ if (nstate == IEEE80211_S_INIT) { (uvp->newstate) (vap, nstate, arg); } return (0); /* nothing to do */ } - mtx_lock(&sc->sc_mtx); - /* store next state */ sc->sc_ns_state = nstate; sc->sc_ns_arg = arg;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809131804.m8DI4qaR073228>