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/pci/if_sis.c | |
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/pci/if_sis.c')
-rw-r--r-- | sys/pci/if_sis.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index 108c356..6a30c7e 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -1337,7 +1337,9 @@ sis_attach(dev) ifp->if_watchdog = sis_watchdog; ifp->if_init = sis_init; ifp->if_baudrate = 10000000; - ifp->if_snd.ifq_maxlen = SIS_TX_LIST_CNT - 1; + IFQ_SET_MAXLEN(&ifp->if_snd, SIS_TX_LIST_CNT - 1); + ifp->if_snd.ifq_drv_maxlen = SIS_TX_LIST_CNT - 1; + IFQ_SET_READY(&ifp->if_snd); /* * Do MII setup. @@ -1727,7 +1729,7 @@ sis_tick(xsc) if (!sc->sis_link && mii->mii_media_status & IFM_ACTIVE && IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { sc->sis_link++; - if (ifp->if_snd.ifq_head != NULL) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) sis_start(ifp); } @@ -1766,7 +1768,7 @@ sis_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) sc->rxcycles = count; sis_rxeof(sc); sis_txeof(sc); - if (ifp->if_snd.ifq_head != NULL) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) sis_start(ifp); if (sc->rxcycles > 0 || cmd == POLL_AND_CHECK_STATUS) { @@ -1853,7 +1855,7 @@ sis_intr(arg) /* Re-enable interrupts. */ CSR_WRITE_4(sc, SIS_IER, 1); - if (ifp->if_snd.ifq_head != NULL) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) sis_start(ifp); done: SIS_UNLOCK(sc); @@ -1970,12 +1972,12 @@ sis_start(ifp) } while(sc->sis_ldata.sis_tx_list[idx].sis_mbuf == NULL) { - IF_DEQUEUE(&ifp->if_snd, m_head); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; if (sis_encap(sc, &m_head, &idx)) { - IF_PREPEND(&ifp->if_snd, m_head); + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; break; } @@ -2337,7 +2339,7 @@ sis_watchdog(ifp) sis_reset(sc); sis_init(sc); - if (ifp->if_snd.ifq_head != NULL) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) sis_start(ifp); SIS_UNLOCK(sc); |