1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

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
This commit is contained in:
Weongyo Jeong 2009-10-14 20:30:27 +00:00
parent db63fc93cc
commit 941da6d392
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198099
5 changed files with 23 additions and 2 deletions

View File

@ -2762,6 +2762,9 @@ uath_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
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:

View File

@ -2291,6 +2291,9 @@ upgt_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
(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:

View File

@ -837,6 +837,9 @@ ural_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error)
usbd_transfer_submit(xfer);
}
RAL_UNLOCK(sc);
ural_start(ifp);
RAL_LOCK(sc);
break;
default: /* Error */
@ -945,8 +948,8 @@ ural_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
* 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 @@ ural_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
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 */

View File

@ -4072,6 +4072,9 @@ urtw_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error)
(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:

View File

@ -2322,6 +2322,9 @@ zyd_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
} 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 @@ zyd_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error)
usbd_xfer_set_priv(xfer, data);
usbd_transfer_submit(xfer);
}
ZYD_UNLOCK(sc);
zyd_start(ifp);
ZYD_LOCK(sc);
break;
default: /* Error */