Enable sk(4) for ATLQ.

Thoroughly tested by:	Ender <ender NO tog SPAM net>
MFC after:		4 weeks
This commit is contained in:
mlaier 2004-12-24 14:13:38 +00:00
parent 35197bc60b
commit daae8e9dd0
3 changed files with 17 additions and 12 deletions

View File

@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd November 21, 2004
.Dd December 24, 2004
.Dt ALTQ 4
.Os
.Sh NAME
@ -121,7 +121,8 @@ They have been applied to the following hardware drivers:
.Xr rl 4 ,
.Xr sf 4 ,
.Xr sis 4 ,
.Xr vr 4
.Xr sk 4 ,
.Xr vr 4 ,
.Xr wi 4 ,
and
.Xr xl 4 .

View File

@ -1387,7 +1387,9 @@ sk_attach(dev)
ifp->if_watchdog = sk_watchdog;
ifp->if_init = sk_init;
ifp->if_baudrate = 1000000000;
ifp->if_snd.ifq_maxlen = SK_TX_RING_CNT - 1;
IFQ_SET_MAXLEN(&ifp->if_snd, SK_TX_RING_CNT - 1);
ifp->if_snd.ifq_drv_maxlen = SK_TX_RING_CNT - 1;
IFQ_SET_READY(&ifp->if_snd);
callout_handle_init(&sc_if->sk_tick_ch);
@ -1844,7 +1846,7 @@ sk_start(ifp)
idx = sc_if->sk_cdata.sk_tx_prod;
while(sc_if->sk_cdata.sk_tx_chain[idx].sk_mbuf == NULL) {
IF_DEQUEUE(&ifp->if_snd, m_head);
IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
if (m_head == NULL)
break;
@ -1854,7 +1856,7 @@ sk_start(ifp)
* for the NIC to drain the ring.
*/
if (sk_encap(sc_if, m_head, &idx)) {
IF_PREPEND(&ifp->if_snd, m_head);
IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
ifp->if_flags |= IFF_OACTIVE;
break;
}
@ -2257,9 +2259,9 @@ sk_intr(xsc)
CSR_WRITE_4(sc, SK_IMR, sc->sk_intrmask);
if (ifp0 != NULL && ifp0->if_snd.ifq_head != NULL)
if (ifp0 != NULL && !IFQ_DRV_IS_EMPTY(&ifp0->if_snd))
sk_start(ifp0);
if (ifp1 != NULL && ifp1->if_snd.ifq_head != NULL)
if (ifp1 != NULL && !IFQ_DRV_IS_EMPTY(&ifp1->if_snd))
sk_start(ifp1);
SK_UNLOCK(sc);

View File

@ -1387,7 +1387,9 @@ sk_attach(dev)
ifp->if_watchdog = sk_watchdog;
ifp->if_init = sk_init;
ifp->if_baudrate = 1000000000;
ifp->if_snd.ifq_maxlen = SK_TX_RING_CNT - 1;
IFQ_SET_MAXLEN(&ifp->if_snd, SK_TX_RING_CNT - 1);
ifp->if_snd.ifq_drv_maxlen = SK_TX_RING_CNT - 1;
IFQ_SET_READY(&ifp->if_snd);
callout_handle_init(&sc_if->sk_tick_ch);
@ -1844,7 +1846,7 @@ sk_start(ifp)
idx = sc_if->sk_cdata.sk_tx_prod;
while(sc_if->sk_cdata.sk_tx_chain[idx].sk_mbuf == NULL) {
IF_DEQUEUE(&ifp->if_snd, m_head);
IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
if (m_head == NULL)
break;
@ -1854,7 +1856,7 @@ sk_start(ifp)
* for the NIC to drain the ring.
*/
if (sk_encap(sc_if, m_head, &idx)) {
IF_PREPEND(&ifp->if_snd, m_head);
IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
ifp->if_flags |= IFF_OACTIVE;
break;
}
@ -2257,9 +2259,9 @@ sk_intr(xsc)
CSR_WRITE_4(sc, SK_IMR, sc->sk_intrmask);
if (ifp0 != NULL && ifp0->if_snd.ifq_head != NULL)
if (ifp0 != NULL && !IFQ_DRV_IS_EMPTY(&ifp0->if_snd))
sk_start(ifp0);
if (ifp1 != NULL && ifp1->if_snd.ifq_head != NULL)
if (ifp1 != NULL && !IFQ_DRV_IS_EMPTY(&ifp1->if_snd))
sk_start(ifp1);
SK_UNLOCK(sc);