]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
i40e: fix nvm version and remove firmware report
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Thu, 6 Feb 2014 05:51:12 +0000 (05:51 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 7 Mar 2014 02:41:58 +0000 (18:41 -0800)
The driver needs to use the format that the current NVM
uses when printing the version of the NVM.  It should remain
this way from now on forward.

The driver was reporting when firmware was less than
an expected version number, but this is not a requirement
for the product and we print the firmware number at
init and in ethtool -i output.  Just remove the print.

Change-ID: Ide0b856cd454ebf867610ef9a0d639bb358a4a60
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c

index ba77fca628afe40618d515f07c5d52f49cfbe211..838b69b74edfce0d03c223efe790dc998a82b5b3 100644 (file)
 
 #define I40E_NVM_VERSION_LO_SHIFT  0
 #define I40E_NVM_VERSION_LO_MASK   (0xff << I40E_NVM_VERSION_LO_SHIFT)
-#define I40E_NVM_VERSION_HI_SHIFT  8
-#define I40E_NVM_VERSION_HI_MASK   (0xff << I40E_NVM_VERSION_HI_SHIFT)
+#define I40E_NVM_VERSION_HI_SHIFT  12
+#define I40E_NVM_VERSION_HI_MASK   (0xf << I40E_NVM_VERSION_HI_SHIFT)
 
 /* The values in here are decimal coded as hex as is the case in the NVM map*/
 #define I40E_CURRENT_NVM_VERSION_HI 0x2
-#define I40E_CURRENT_NVM_VERSION_LO 0x30
+#define I40E_CURRENT_NVM_VERSION_LO 0x40
 
 /* magic for getting defines into strings */
 #define STRINGIFY(foo)  #foo
@@ -489,10 +489,10 @@ static inline char *i40e_fw_version_str(struct i40e_hw *hw)
                 "f%d.%d a%d.%d n%02x.%02x e%08x",
                 hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
                 hw->aq.api_maj_ver, hw->aq.api_min_ver,
-                (hw->nvm.version & I40E_NVM_VERSION_HI_MASK)
-                                               >> I40E_NVM_VERSION_HI_SHIFT,
-                (hw->nvm.version & I40E_NVM_VERSION_LO_MASK)
-                                               >> I40E_NVM_VERSION_LO_SHIFT,
+                (hw->nvm.version & I40E_NVM_VERSION_HI_MASK) >>
+                       I40E_NVM_VERSION_HI_SHIFT,
+                (hw->nvm.version & I40E_NVM_VERSION_LO_MASK) >>
+                       I40E_NVM_VERSION_LO_SHIFT,
                 hw->nvm.eetrack);
 
        return buf;
index 50d003258ff1b292746d9aa77d94badb95b6186e..0fc6f9dce01ab576999230c0e7bb80775d56fe2f 100644 (file)
@@ -7981,13 +7981,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        err = i40e_init_adminq(hw);
        dev_info(&pdev->dev, "%s\n", i40e_fw_version_str(hw));
-       if (((hw->nvm.version & I40E_NVM_VERSION_HI_MASK)
-                >> I40E_NVM_VERSION_HI_SHIFT) != I40E_CURRENT_NVM_VERSION_HI) {
-               dev_info(&pdev->dev,
-                        "warning: NVM version not supported, supported version: %02x.%02x\n",
-                        I40E_CURRENT_NVM_VERSION_HI,
-                        I40E_CURRENT_NVM_VERSION_LO);
-       }
        if (err) {
                dev_info(&pdev->dev,
                         "init_adminq failed: %d expecting API %02x.%02x\n",