aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/netxen/netxen_nic_main.c
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2007-12-31 10:08:57 -0800
committerJeff Garzik <jeff@garzik.org>2008-01-12 17:35:38 -0500
commit5dc162682d4901025a02b7045f3112d569b4bab9 (patch)
tree410daa76d45f3f7aee13eb0750b890a9ba8ad49f /drivers/net/netxen/netxen_nic_main.c
parent53a01e00f8c78bc5875e09aca7749ea54bb09798 (diff)
netxen: fix byte-swapping in tx and rx
Here's the reworked patch. This cleans up some unnecessary byte-swapping while setting up tx and interpreting rx desc. The 64 bit rx status data should be converted to host endian format only once and the macros just need to extract bitfields. This saves a spate of interrupts on pseries blades caused by buggy (non) processing rx status ring. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_main.c')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index cec9e04f51e..263b55e36c7 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1152,16 +1152,8 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
}
}
- i = netxen_get_cmd_desc_totallength(&hw->cmd_desc_head[saved_producer]);
-
- hw->cmd_desc_head[saved_producer].flags_opcode =
- cpu_to_le16(hw->cmd_desc_head[saved_producer].flags_opcode);
- hw->cmd_desc_head[saved_producer].num_of_buffers_total_length =
- cpu_to_le32(hw->cmd_desc_head[saved_producer].
- num_of_buffers_total_length);
-
spin_lock_bh(&adapter->tx_lock);
- adapter->stats.txbytes += i;
+ adapter->stats.txbytes += skb->len;
/* Code to update the adapter considering how many producer threads
are currently working */