forked from Imagelibrary/rtems
leon, greth: 10/100 MAC enable TX BD interrupt
Missed to enable interrupt per TX descriptor. Could lead to TX buffer starvation. Does not affect the GBit code.
This commit is contained in:
@@ -868,23 +868,23 @@ sendpacket (struct ifnet *ifp, struct mbuf *m)
|
|||||||
if ((m = m->m_next) == NULL)
|
if ((m = m->m_next) == NULL)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_freem (n);
|
m_freem (n);
|
||||||
|
|
||||||
/* don't send long packets */
|
/* don't send long packets */
|
||||||
|
|
||||||
if (len <= GRETH_MAXBUF_LEN) {
|
if (len <= GRETH_MAXBUF_LEN) {
|
||||||
if (dp->tx_ptr < dp->txbufs-1) {
|
if (dp->tx_ptr < dp->txbufs-1) {
|
||||||
dp->txdesc[dp->tx_ptr].ctrl = GRETH_TXD_ENABLE | len;
|
dp->txdesc[dp->tx_ptr].ctrl = GRETH_TXD_IRQ |
|
||||||
|
GRETH_TXD_ENABLE | len;
|
||||||
} else {
|
} else {
|
||||||
dp->txdesc[dp->tx_ptr].ctrl =
|
dp->txdesc[dp->tx_ptr].ctrl = GRETH_TXD_IRQ |
|
||||||
GRETH_TXD_WRAP | GRETH_TXD_ENABLE | len;
|
GRETH_TXD_WRAP | GRETH_TXD_ENABLE | len;
|
||||||
}
|
}
|
||||||
dp->tx_ptr = (dp->tx_ptr + 1) % dp->txbufs;
|
dp->tx_ptr = (dp->tx_ptr + 1) % dp->txbufs;
|
||||||
SPIN_LOCK_IRQ(&dp->devlock, flags);
|
SPIN_LOCK_IRQ(&dp->devlock, flags);
|
||||||
dp->regs->ctrl = dp->regs->ctrl | GRETH_CTRL_TXEN;
|
dp->regs->ctrl = dp->regs->ctrl | GRETH_CTRL_TXEN;
|
||||||
SPIN_UNLOCK_IRQ(&dp->devlock, flags);
|
SPIN_UNLOCK_IRQ(&dp->devlock, flags);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user