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>
This commit is contained in:
Dhananjay Phadke
2007-12-31 10:08:57 -08:00
committed by Jeff Garzik
parent 53a01e00f8
commit 5dc162682d
3 changed files with 40 additions and 45 deletions

View File

@@ -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 */