ixgbe: Return 64 bit stats values
authorPreethi Banala <preethi.banala@intel.com>
Thu, 21 Apr 2016 18:40:24 +0000 (11:40 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 4 May 2016 07:24:30 +0000 (00:24 -0700)
The code was ignoring higher 32 bits of stats registers. This patch
correctly fills out 64 bit value in two 32 bit words.

Signed-off-by: Preethi Banala <preethi.banala@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

index d3efcb4fecce14aa7b3532c6ff467eade53bc546..a696192eae206a34aee0fceec916ef245a269469 100644 (file)
@@ -720,8 +720,10 @@ static void ixgbe_get_regs(struct net_device *netdev,
        regs_buff[939] = IXGBE_GET_STAT(adapter, bprc);
        regs_buff[940] = IXGBE_GET_STAT(adapter, mprc);
        regs_buff[941] = IXGBE_GET_STAT(adapter, gptc);
-       regs_buff[942] = IXGBE_GET_STAT(adapter, gorc);
-       regs_buff[944] = IXGBE_GET_STAT(adapter, gotc);
+       regs_buff[942] = (u32)IXGBE_GET_STAT(adapter, gorc);
+       regs_buff[943] = (u32)(IXGBE_GET_STAT(adapter, gorc) >> 32);
+       regs_buff[944] = (u32)IXGBE_GET_STAT(adapter, gotc);
+       regs_buff[945] = (u32)(IXGBE_GET_STAT(adapter, gotc) >> 32);
        for (i = 0; i < 8; i++)
                regs_buff[946 + i] = IXGBE_GET_STAT(adapter, rnbc[i]);
        regs_buff[954] = IXGBE_GET_STAT(adapter, ruc);
@@ -731,7 +733,8 @@ static void ixgbe_get_regs(struct net_device *netdev,
        regs_buff[958] = IXGBE_GET_STAT(adapter, mngprc);
        regs_buff[959] = IXGBE_GET_STAT(adapter, mngpdc);
        regs_buff[960] = IXGBE_GET_STAT(adapter, mngptc);
-       regs_buff[961] = IXGBE_GET_STAT(adapter, tor);
+       regs_buff[961] = (u32)IXGBE_GET_STAT(adapter, tor);
+       regs_buff[962] = (u32)(IXGBE_GET_STAT(adapter, tor) >> 32);
        regs_buff[963] = IXGBE_GET_STAT(adapter, tpr);
        regs_buff[964] = IXGBE_GET_STAT(adapter, tpt);
        regs_buff[965] = IXGBE_GET_STAT(adapter, ptc64);