]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[e1000] Request notification of TX completions
authorMichael Brown <mcb30@ipxe.org>
Tue, 6 Dec 2011 01:43:29 +0000 (01:43 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 6 Dec 2011 01:50:28 +0000 (01:50 +0000)
The RS bit is used to instruct the NIC to update the TX descriptor
status byte.  The RPS bit is used to instruct the NIC to defer this
update until after the packet has been transmitted on the wire (rather
than merely read into the transmit FIFO).

The driver currently sets RPS but not RS.  Some e1000 models seem to
interpret this as implying that the status byte should be updated;
some don't.  On the ones that don't, we never see any TX completions
and so rapidly run out of TX buffers.

Fix by setting the RS bit in the TX descriptor.  (We don't care about
when the packet reaches the wire, so don't bother setting the RPS
bit.)

Reported-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/e1000/e1000_main.c

index 653323b51b68f237ec7248a1c80294678bc20f66..bc2aa9684b95fccce2f56ccd90e9a2116c676bf9 100644 (file)
@@ -611,7 +611,7 @@ static int e1000_transmit ( struct net_device *netdev, struct io_buffer *iobuf )
        tx_curr_desc->buffer_addr =
                virt_to_bus ( iobuf->data );
        tx_curr_desc->lower.data =
-               E1000_TXD_CMD_RPS  | E1000_TXD_CMD_EOP |
+               E1000_TXD_CMD_RS | E1000_TXD_CMD_EOP |
                E1000_TXD_CMD_IFCS | iob_len ( iobuf );
        tx_curr_desc->upper.data = 0;