Add altq(4) support.
Reviewed by: mlaier Approved by: rwatson (mentor) MFC after: 2 weeks
This commit is contained in:
parent
f9fc583f17
commit
9522f75aea
@ -885,7 +885,9 @@ my_attach(device_t dev)
|
||||
ifp->if_watchdog = my_watchdog;
|
||||
ifp->if_init = my_init;
|
||||
ifp->if_baudrate = 10000000;
|
||||
ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
|
||||
IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
|
||||
ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
if (sc->my_info->my_did == MTD803ID)
|
||||
sc->my_pinfo = my_phys;
|
||||
@ -1305,7 +1307,7 @@ my_intr(void *arg)
|
||||
|
||||
/* Re-enable interrupts. */
|
||||
CSR_WRITE_4(sc, MY_IMR, MY_INTRS);
|
||||
if (ifp->if_snd.ifq_head != NULL)
|
||||
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
|
||||
my_start_locked(ifp);
|
||||
MY_UNLOCK(sc);
|
||||
return;
|
||||
@ -1405,7 +1407,7 @@ my_start_locked(struct ifnet * ifp)
|
||||
}
|
||||
start_tx = sc->my_cdata.my_tx_free;
|
||||
while (sc->my_cdata.my_tx_free->my_mbuf == NULL) {
|
||||
IF_DEQUEUE(&ifp->if_snd, m_head);
|
||||
IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
|
||||
if (m_head == NULL)
|
||||
break;
|
||||
|
||||
@ -1692,7 +1694,7 @@ my_watchdog(struct ifnet * ifp)
|
||||
my_stop(sc);
|
||||
my_reset(sc);
|
||||
my_init_locked(sc);
|
||||
if (ifp->if_snd.ifq_head != NULL)
|
||||
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
|
||||
my_start_locked(ifp);
|
||||
MY_LOCK(sc);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user