summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_ste.c
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2005-07-08 13:05:59 +0000
committermlaier <mlaier@FreeBSD.org>2005-07-08 13:05:59 +0000
commit13c72959841a47d13f4341322eebcecf4e5bdc85 (patch)
treea01f038d17525b1a3a41fe5931afe231036e89f2 /sys/pci/if_ste.c
parentf525ab342b48e6ff48f506583f9f629bd1ecf6e8 (diff)
downloadFreeBSD-src-13c72959841a47d13f4341322eebcecf4e5bdc85.zip
FreeBSD-src-13c72959841a47d13f4341322eebcecf4e5bdc85.tar.gz
ALTQify ste(4).
Requested and tested by: <nike_d at cytexbg dot com> Approved by: re (scottl)
Diffstat (limited to 'sys/pci/if_ste.c')
-rw-r--r--sys/pci/if_ste.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/pci/if_ste.c b/sys/pci/if_ste.c
index 1ff6b97..27d5399 100644
--- a/sys/pci/if_ste.c
+++ b/sys/pci/if_ste.c
@@ -623,7 +623,7 @@ ste_poll(struct ifnet *ifp, enum poll_cmd cmd, int count)
ste_rxeoc(sc);
ste_rxeof(sc);
ste_txeof(sc);
- if (ifp->if_snd.ifq_head != NULL)
+ if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
ste_start(ifp);
if (cmd == POLL_AND_CHECK_STATUS) {
@@ -716,7 +716,7 @@ ste_intr(xsc)
/* Re-enable interrupts */
CSR_WRITE_2(sc, STE_IMR, STE_INTRS);
- if (ifp->if_snd.ifq_head != NULL)
+ if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
ste_start(ifp);
#ifdef DEVICE_POLLING
@@ -938,7 +938,7 @@ ste_stats_update(xsc)
* otherwise we get stuck in the wrong link state
*/
ste_miibus_statchg(sc->ste_dev);
- if (ifp->if_snd.ifq_head != NULL)
+ if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
ste_start(ifp);
}
}
@@ -1085,7 +1085,9 @@ ste_attach(dev)
ifp->if_watchdog = ste_watchdog;
ifp->if_init = ste_init;
ifp->if_baudrate = 10000000;
- ifp->if_snd.ifq_maxlen = STE_TX_LIST_CNT - 1;
+ IFQ_SET_MAXLEN(&ifp->if_snd, STE_TX_LIST_CNT - 1);
+ ifp->if_snd.ifq_drv_maxlen = STE_TX_LIST_CNT - 1;
+ IFQ_SET_READY(&ifp->if_snd);
sc->ste_tx_thresh = STE_TXSTART_THRESH;
@@ -1610,7 +1612,7 @@ ste_start(ifp)
break;
}
- IF_DEQUEUE(&ifp->if_snd, m_head);
+ IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
if (m_head == NULL)
break;
@@ -1678,7 +1680,7 @@ ste_watchdog(ifp)
ste_reset(sc);
ste_init(sc);
- if (ifp->if_snd.ifq_head != NULL)
+ if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
ste_start(ifp);
STE_UNLOCK(sc);
OpenPOWER on IntegriCloud