aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_main.c
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2007-12-31 13:08:57 -0500
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 cec9e04f51ea..263b55e36c7a 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)
1152 } 1152 }
1153 } 1153 }
1154 1154
1155 i = netxen_get_cmd_desc_totallength(&hw->cmd_desc_head[saved_producer]);
1156
1157 hw->cmd_desc_head[saved_producer].flags_opcode =
1158 cpu_to_le16(hw->cmd_desc_head[saved_producer].flags_opcode);
1159 hw->cmd_desc_head[saved_producer].num_of_buffers_total_length =
1160 cpu_to_le32(hw->cmd_desc_head[saved_producer].
1161 num_of_buffers_total_length);
1162
1163 spin_lock_bh(&adapter->tx_lock); 1155 spin_lock_bh(&adapter->tx_lock);
1164 adapter->stats.txbytes += i; 1156 adapter->stats.txbytes += skb->len;
1165 1157
1166 /* Code to update the adapter considering how many producer threads 1158 /* Code to update the adapter considering how many producer threads
1167 are currently working */ 1159 are currently working */