]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnx2x: fix bnx2x_storm_stats_update() on big endian
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 13 Feb 2012 06:23:12 +0000 (06:23 +0000)
committerJoe Jin <joe.jin@oracle.com>
Wed, 16 May 2012 14:43:21 +0000 (22:43 +0800)
commit 619c5cb6885 (New 7.0 FW: bnx2x, cnic, bnx2i, bnx2fc) added new
sparse warnings.

(cherry picked from commit 66d885cba670059396b2f9ed9d5f4cbead0baee0)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/bnx2x/bnx2x_stats.c

index 9dd1a3e619a3e2630b37cd7df93600049cee99e5..0fc0d97bc5f5c78530098300bd27f16755fc361a 100644 (file)
@@ -1080,17 +1080,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,