ixgbe: add mac type to the version in ethtool_regs
authorEmil Tantilov <emil.s.tantilov@intel.com>
Fri, 19 Apr 2013 09:31:17 +0000 (09:31 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 26 Apr 2013 03:38:28 +0000 (20:38 -0700)
This patch adds the mac type to the version in ethtool_regs.

This will make it easier to check the mac type when dumping registers with
ethtool. The drawback of this is that older versions of ethtool will only
be able to dump in hex format for 82599 and above  when used with the updated
driver.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

index 509d3ae191f3cdc0eef61147ebdf966b52a1ca7b..d3754722adb4097ffdf168df442fe867859171bf 100644 (file)
@@ -440,7 +440,8 @@ static void ixgbe_get_regs(struct net_device *netdev,
 
        memset(p, 0, IXGBE_REGS_LEN * sizeof(u32));
 
-       regs->version = (1 << 24) | hw->revision_id << 16 | hw->device_id;
+       regs->version = hw->mac.type << 24 | hw->revision_id << 16 |
+                       hw->device_id;
 
        /* General Registers */
        regs_buff[0] = IXGBE_READ_REG(hw, IXGBE_CTRL);