summaryrefslogtreecommitdiffstats
path: root/src/drivers/net
diff options
context:
space:
mode:
authorMichael Brown2006-06-16 16:38:16 +0200
committerMichael Brown2006-06-16 16:38:16 +0200
commitd393e61d8abac204a1a3c65a365139267b3832bc (patch)
tree62b77b3bc62046263995180b2581b0becd3d4c39 /src/drivers/net
parentAdd 4 bytes to maximum frame length to allow for the frame checksum. (diff)
downloadipxe-d393e61d8abac204a1a3c65a365139267b3832bc.tar.gz
ipxe-d393e61d8abac204a1a3c65a365139267b3832bc.tar.xz
ipxe-d393e61d8abac204a1a3c65a365139267b3832bc.zip
Temporary hack to work around the "TX overflow" problem in the interim
period before updating to the new driver API (which can cope with having TX packets in progress).
Diffstat (limited to 'src/drivers/net')
-rw-r--r--src/drivers/net/etherfabric.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/drivers/net/etherfabric.c b/src/drivers/net/etherfabric.c
index 68d2a2a3..125dfa54 100644
--- a/src/drivers/net/etherfabric.c
+++ b/src/drivers/net/etherfabric.c
@@ -173,7 +173,6 @@ struct efab_nic {
unsigned int eventq_read_ptr; /* Falcon only */
unsigned int tx_write_ptr;
unsigned int rx_write_ptr;
- int tx_in_progress;
/** Port 0/1 on the NIC */
int port;
@@ -2706,7 +2705,6 @@ static int etherfabric_poll ( struct nic *nic, int retrieve ) {
/* TX completed - mark as done */
DBG ( "TX id %x complete\n",
efab->tx_buf.id );
- efab->tx_in_progress = 0;
} else if ( event.type == EFAB_EV_RX ) {
/* RX - find corresponding buffer */
for ( i = 0 ; i < EFAB_RX_BUFS ; i++ ) {
@@ -2766,15 +2764,6 @@ static void etherfabric_transmit ( struct nic *nic, const char *dest,
struct efab_nic *efab = nic->priv_data;
unsigned int nstype = htons ( type );
- /* We can only transmit one packet at a time; a TX completion
- * event must be received before we can transmit the next
- * packet. Since there is only one static TX buffer, we don't
- * worry unduly about overflow, but we report it anyway.
- */
- if ( efab->tx_in_progress ) {
- printf ( "TX overflow!\n" );
- }
-
/* Fill TX buffer, pad to ETH_ZLEN */
memcpy ( efab->tx_buf.addr, dest, ETH_ALEN );
memcpy ( efab->tx_buf.addr + ETH_ALEN, nic->node_addr, ETH_ALEN );
@@ -2789,13 +2778,10 @@ static void etherfabric_transmit ( struct nic *nic, const char *dest,
/* Push TX descriptor */
efab_push_tx_buffer ( efab, &efab->tx_buf );
- /* There is no way to wait for TX complete (i.e. TX buffer
- * available to re-use for the next transmit) without reading
- * from the event queue. We therefore simply leave the TX
- * buffer marked as "in use" until a TX completion event
- * happens to be picked up by a call to etherfabric_poll().
+ /* Allow enough time for the packet to be transmitted. This
+ * is a temporary hack until we update to the new driver API.
*/
- efab->tx_in_progress = 1;
+ udelay ( 20 );
return;
}
@@ -2892,9 +2878,6 @@ static int etherfabric_probe ( struct nic *nic, struct pci_device *pci ) {
return 0;
memcpy ( nic->node_addr, efab.mac_addr, ETH_ALEN );
- /* hello world */
- printf ( "Found EtherFabric %s NIC %!\n", pci->name, nic->node_addr );
-
/* point to NIC specific routines */
nic->nic_op = &etherfabric_operations;