david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[realtek] Defer packets when no transmit descriptors are available

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2013-05-01 14:07:51 +01:00
parent 2095ed413e
commit b4ec6a6a68
1 changed files with 3 additions and 3 deletions

View File

@ -724,8 +724,8 @@ static int realtek_transmit ( struct net_device *netdev,
/* Get next transmit descriptor */
if ( ( rtl->tx.prod - rtl->tx.cons ) >= RTL_NUM_TX_DESC ) {
DBGC ( rtl, "REALTEK %p out of transmit descriptors\n", rtl );
return -ENOBUFS;
netdev_tx_defer ( netdev, iobuf );
return 0;
}
tx_idx = ( rtl->tx.prod++ % RTL_NUM_TX_DESC );
@ -809,8 +809,8 @@ static void realtek_poll_tx ( struct net_device *netdev ) {
DBGC2 ( rtl, "REALTEK %p TX %d complete\n", rtl, tx_idx );
/* Complete TX descriptor */
netdev_tx_complete_next ( netdev );
rtl->tx.cons++;
netdev_tx_complete_next ( netdev );
}
}