summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorweongyo <weongyo@FreeBSD.org>2009-10-14 20:30:27 +0000
committerweongyo <weongyo@FreeBSD.org>2009-10-14 20:30:27 +0000
commit2ae8c0517d918f59e4147a624115484eb78780ba (patch)
tree8ff6e3e7b7303e172b9169618fdc742e1955a1af
parent7bb073cf51aba5851c1b9723e62675bec4481d14 (diff)
downloadFreeBSD-src-2ae8c0517d918f59e4147a624115484eb78780ba.zip
FreeBSD-src-2ae8c0517d918f59e4147a624115484eb78780ba.tar.gz
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
-rw-r--r--sys/dev/usb/wlan/if_uath.c3
-rw-r--r--sys/dev/usb/wlan/if_upgt.c3
-rw-r--r--sys/dev/usb/wlan/if_ural.c10
-rw-r--r--sys/dev/usb/wlan/if_urtw.c3
-rw-r--r--sys/dev/usb/wlan/if_zyd.c6
5 files changed, 23 insertions, 2 deletions
diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c
index ca9beb3..686f9b6 100644
--- a/sys/dev/usb/wlan/if_uath.c
+++ b/sys/dev/usb/wlan/if_uath.c
@@ -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:
diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c
index c04c398..67e6980 100644
--- a/sys/dev/usb/wlan/if_upgt.c
+++ b/sys/dev/usb/wlan/if_upgt.c
@@ -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:
diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c
index f9a90a2..c2e6d75 100644
--- a/sys/dev/usb/wlan/if_ural.c
+++ b/sys/dev/usb/wlan/if_ural.c
@@ -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 */
diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c
index 391a32c..2c8b7c2 100644
--- a/sys/dev/usb/wlan/if_urtw.c
+++ b/sys/dev/usb/wlan/if_urtw.c
@@ -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:
diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c
index 493c5fa..6fa07c7 100644
--- a/sys/dev/usb/wlan/if_zyd.c
+++ b/sys/dev/usb/wlan/if_zyd.c
@@ -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 */
OpenPOWER on IntegriCloud