Skip to content

Commit

Permalink
amd8111e big-endian fix
Browse files Browse the repository at this point in the history
amd8111e_calc_coalesce() ends up with insane values of tx_data_rate since
->tx_bytes increments missing conversion from little- to host-endian

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Al Viro authored and David S. Miller committed Oct 10, 2007
1 parent ee41a82 commit 05d2fec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/amd8111e.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,8 @@ static int amd8111e_tx(struct net_device *dev)
lp->tx_complete_idx++;
/*COAL update tx coalescing parameters */
lp->coal_conf.tx_packets++;
lp->coal_conf.tx_bytes += lp->tx_ring[tx_index].buff_count;
lp->coal_conf.tx_bytes +=
le16_to_cpu(lp->tx_ring[tx_index].buff_count);

if (netif_queue_stopped(dev) &&
lp->tx_complete_idx > lp->tx_idx - NUM_TX_BUFFERS +2){
Expand Down

0 comments on commit 05d2fec

Please sign in to comment.