From owner-p4-projects@FreeBSD.ORG Sat Sep 13 18:04:54 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0092F1065675; Sat, 13 Sep 2008 18:04:54 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8A951065671 for ; Sat, 13 Sep 2008 18:04:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9E7278FC0A for ; Sat, 13 Sep 2008 18:04:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m8DI4ruW073239 for ; Sat, 13 Sep 2008 18:04:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8DI4qaR073228 for perforce@freebsd.org; Sat, 13 Sep 2008 18:04:52 GMT (envelope-from hselasky@FreeBSD.org) Date: Sat, 13 Sep 2008 18:04:52 GMT Message-Id: <200809131804.m8DI4qaR073228@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 149720 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 18:04:54 -0000 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;