summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/intel.c
diff options
context:
space:
mode:
authorMichael Brown2014-04-22 14:12:54 +0200
committerMichael Brown2014-04-22 14:12:54 +0200
commit27884298a39553aa0b9b336493c988cf54d73f77 (patch)
treecd34aee6b6cb35a796f3d7524c7097e3ceac77af /src/drivers/net/intel.c
parent[crypto] Allow wildcard matches on commonName as well as subjectAltName (diff)
downloadipxe-27884298a39553aa0b9b336493c988cf54d73f77.tar.gz
ipxe-27884298a39553aa0b9b336493c988cf54d73f77.tar.xz
ipxe-27884298a39553aa0b9b336493c988cf54d73f77.zip
[intel] Avoid completely filling the TX descriptor ring
It is unclear from the datasheets whether or not the TX ring can be completely filled (i.e. whether writing the tail value as equal to the current head value will cause the ring to be treated as completely full or completely empty). It is very plausible that this edge case could differ in behaviour between real hardware and the many implementations of an emulated Intel NIC found in various virtual machines. Err on the side of caution and always leave at least one ring entry empty. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/intel.c')
-rw-r--r--src/drivers/net/intel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/net/intel.c b/src/drivers/net/intel.c
index 04e86dd4..f5601263 100644
--- a/src/drivers/net/intel.c
+++ b/src/drivers/net/intel.c
@@ -593,7 +593,7 @@ int intel_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
physaddr_t address;
/* Get next transmit descriptor */
- if ( ( intel->tx.prod - intel->tx.cons ) >= INTEL_NUM_TX_DESC ) {
+ if ( ( intel->tx.prod - intel->tx.cons ) >= INTEL_TX_FILL ) {
DBGC ( intel, "INTEL %p out of transmit descriptors\n", intel );
return -ENOBUFS;
}