Skip to content

Commit

Permalink
bnx2x: fix bnx2x_storm_stats_update() on big endian
Browse files Browse the repository at this point in the history
commit 619c5cb (New 7.0 FW: bnx2x, cnic, bnx2i, bnx2fc) added new
sparse warnings.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Cc: Vladislav Zolotarov <vladz@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Feb 13, 2012
1 parent 7465ac3 commit 66d885c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -1081,17 +1081,17 @@ static int bnx2x_storm_stats_update(struct bnx2x *bp)
estats->rx_stat_ifhcinbadoctets_lo);

ADD_64(fstats->total_bytes_received_hi,
tfunc->rcv_error_bytes.hi,
le32_to_cpu(tfunc->rcv_error_bytes.hi),
fstats->total_bytes_received_lo,
tfunc->rcv_error_bytes.lo);
le32_to_cpu(tfunc->rcv_error_bytes.lo));

memcpy(estats, &(fstats->total_bytes_received_hi),
sizeof(struct host_func_stats) - 2*sizeof(u32));

ADD_64(estats->error_bytes_received_hi,
tfunc->rcv_error_bytes.hi,
le32_to_cpu(tfunc->rcv_error_bytes.hi),
estats->error_bytes_received_lo,
tfunc->rcv_error_bytes.lo);
le32_to_cpu(tfunc->rcv_error_bytes.lo));

ADD_64(estats->etherstatsoverrsizepkts_hi,
estats->rx_stat_dot3statsframestoolong_hi,
Expand Down

0 comments on commit 66d885c

Please sign in to comment.