Date: Wed, 14 Oct 2009 20:30:27 +0000 (UTC) From: Weongyo Jeong <weongyo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r198099 - head/sys/dev/usb/wlan Message-ID: <200910142030.n9EKUR4f048044@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: weongyo Date: Wed Oct 14 20:30:27 2009 New Revision: 198099 URL: http://svn.freebsd.org/changeset/base/198099 Log: fixes a TX hang that could be possible to happen when the trasfers are in the high speed that some drivers don't call if_start callback after marking ~IFF_DRV_OACTIVE. MFC after: 3 days Modified: head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Wed Oct 14 20:09:09 2009 (r198098) +++ head/sys/dev/usb/wlan/if_uath.c Wed Oct 14 20:30:27 2009 (r198099) @@ -2762,6 +2762,9 @@ setup: m = NULL; desc = NULL; } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + uath_start(ifp); UATH_LOCK(sc); break; default: Modified: head/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- head/sys/dev/usb/wlan/if_upgt.c Wed Oct 14 20:09:09 2009 (r198098) +++ head/sys/dev/usb/wlan/if_upgt.c Wed Oct 14 20:30:27 2009 (r198099) @@ -2291,6 +2291,9 @@ setup: (void) ieee80211_input_all(ic, m, rssi, nf); m = NULL; } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + upgt_start(ifp); UPGT_LOCK(sc); break; default: Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Wed Oct 14 20:09:09 2009 (r198098) +++ head/sys/dev/usb/wlan/if_ural.c Wed Oct 14 20:30:27 2009 (r198099) @@ -837,6 +837,9 @@ tr_setup: usbd_transfer_submit(xfer); } + RAL_UNLOCK(sc); + ural_start(ifp); + RAL_LOCK(sc); break; default: /* Error */ @@ -945,8 +948,8 @@ tr_setup: * the private mutex of a device! That is why we do the * "ieee80211_input" here, and not some lines up! */ + RAL_UNLOCK(sc); if (m) { - RAL_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); if (ni != NULL) { @@ -954,8 +957,11 @@ tr_setup: ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - RAL_LOCK(sc); } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + ural_start(ifp); + RAL_LOCK(sc); return; default: /* Error */ Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Wed Oct 14 20:09:09 2009 (r198098) +++ head/sys/dev/usb/wlan/if_urtw.c Wed Oct 14 20:30:27 2009 (r198099) @@ -4072,6 +4072,9 @@ setup: (void) ieee80211_input_all(ic, m, rssi, nf); m = NULL; } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + urtw_start(ifp); URTW_LOCK(sc); break; default: Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Wed Oct 14 20:09:09 2009 (r198098) +++ head/sys/dev/usb/wlan/if_zyd.c Wed Oct 14 20:30:27 2009 (r198099) @@ -2322,6 +2322,9 @@ tr_setup: } else (void)ieee80211_input_all(ic, m, rssi, nf); } + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0 && + !IFQ_IS_EMPTY(&ifp->if_snd)) + zyd_start(ifp); ZYD_LOCK(sc); break; @@ -2431,6 +2434,9 @@ tr_setup: usbd_xfer_set_priv(xfer, data); usbd_transfer_submit(xfer); } + ZYD_UNLOCK(sc); + zyd_start(ifp); + ZYD_LOCK(sc); break; default: /* Error */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910142030.n9EKUR4f048044>