diff options
author | mlaier <mlaier@FreeBSD.org> | 2004-07-02 12:16:02 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2004-07-02 12:16:02 +0000 |
commit | 7bc770a2546e8a5f93ee931634d4064b3b6e08f2 (patch) | |
tree | 65f0224543a217107b8c639eebd90136c5b1386d /sys/dev/fxp | |
parent | 1ddf2fdcc0eaea7a1f7848fe9957f173c396c23c (diff) | |
download | FreeBSD-src-7bc770a2546e8a5f93ee931634d4064b3b6e08f2.zip FreeBSD-src-7bc770a2546e8a5f93ee931634d4064b3b6e08f2.tar.gz |
Bring in the first chunk of altq driver modifications. This covers the
following drivers: bfe(4), em(4), fxp(4), lnc(4), tun(4), de(4) rl(4),
sis(4) and xl(4)
More patches are pending on: http://peoples.freebsd.org/~mlaier/ Please take
a look and tell me if "your" driver is missing, so I can fix this.
Tested-by: many
No-objection: -current, -net
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 6dc1aa6..65de7e1 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -796,7 +796,9 @@ fxp_attach(device_t dev) * Let the system queue as many packets as we have available * TX descriptors. */ - ifp->if_snd.ifq_maxlen = FXP_NTXCB - 1; + IFQ_SET_MAXLEN(&ifp->if_snd, FXP_NTXCB - 1); + ifp->if_snd.ifq_drv_maxlen = FXP_NTXCB - 1; + IFQ_SET_READY(&ifp->if_snd); /* * Hook our interrupt after all initialization is complete. @@ -1278,12 +1280,15 @@ fxp_start_body(struct ifnet *ifp) * NOTE: One TxCB is reserved to guarantee that fxp_mc_setup() can add * a NOP command when needed. */ - while (ifp->if_snd.ifq_head != NULL && sc->tx_queued < FXP_NTXCB - 1) { + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd) && + sc->tx_queued < FXP_NTXCB - 1) { /* * Grab a packet to transmit. */ - IF_DEQUEUE(&ifp->if_snd, mb_head); + IFQ_DRV_DEQUEUE(&ifp->if_snd, mb_head); + if (mb_head == NULL) + break; /* * Get pointer to next available tx desc. @@ -1634,7 +1639,7 @@ fxp_intr_body(struct fxp_softc *sc, struct ifnet *ifp, u_int8_t statack, /* * Try to start more packets transmitting. */ - if (ifp->if_snd.ifq_head != NULL) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) fxp_start_body(ifp); } |