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:
@@ -875,16 +875,16 @@ sendpacket (struct ifnet *ifp, struct mbuf *m)
|
||||
|
||||
if (len <= GRETH_MAXBUF_LEN) {
|
||||
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 {
|
||||
dp->txdesc[dp->tx_ptr].ctrl =
|
||||
dp->txdesc[dp->tx_ptr].ctrl = GRETH_TXD_IRQ |
|
||||
GRETH_TXD_WRAP | GRETH_TXD_ENABLE | len;
|
||||
}
|
||||
dp->tx_ptr = (dp->tx_ptr + 1) % dp->txbufs;
|
||||
SPIN_LOCK_IRQ(&dp->devlock, flags);
|
||||
dp->regs->ctrl = dp->regs->ctrl | GRETH_CTRL_TXEN;
|
||||
SPIN_UNLOCK_IRQ(&dp->devlock, flags);
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user