Commit 29a0645c authored by Shannon Nelson's avatar Shannon Nelson Committed by Jeff Kirsher

i40e: tame the nvmupdate read and write complaints

The NVMUpdate tool doesn't necessarily know the ReadOnly map of the current
NVM image, and must try reading and writing words that may be protected.
This generates an error out of the Firmware request that the driver logs.
Unfortunately, this ends up spitting out hundreds of bogus read and write
error message that looks rather messy.

This patch checks the error type and under normal conditions will not print
the typical read and write errors during NVMUpdate.  This can be overridden
by enabling the NVM update debugging.  This results in a much less messy log
file, and likely many fewer customer support questions.

Change-ID: Id4ff2e9048c523b0ff503aa5ab181b025ec948ea
Signed-off-by: default avatarShannon Nelson <shannon.nelson@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 97bf75f1
...@@ -917,7 +917,9 @@ static int i40e_get_eeprom(struct net_device *netdev, ...@@ -917,7 +917,9 @@ static int i40e_get_eeprom(struct net_device *netdev,
cmd = (struct i40e_nvm_access *)eeprom; cmd = (struct i40e_nvm_access *)eeprom;
ret_val = i40e_nvmupd_command(hw, cmd, bytes, &errno); ret_val = i40e_nvmupd_command(hw, cmd, bytes, &errno);
if (ret_val) if (ret_val &&
((hw->aq.asq_last_status != I40E_AQ_RC_EACCES) ||
(hw->debug_mask & I40E_DEBUG_NVM)))
dev_info(&pf->pdev->dev, dev_info(&pf->pdev->dev,
"NVMUpdate read failed err=%d status=0x%x errno=%d module=%d offset=0x%x size=%d\n", "NVMUpdate read failed err=%d status=0x%x errno=%d module=%d offset=0x%x size=%d\n",
ret_val, hw->aq.asq_last_status, errno, ret_val, hw->aq.asq_last_status, errno,
...@@ -1021,7 +1023,10 @@ static int i40e_set_eeprom(struct net_device *netdev, ...@@ -1021,7 +1023,10 @@ static int i40e_set_eeprom(struct net_device *netdev,
cmd = (struct i40e_nvm_access *)eeprom; cmd = (struct i40e_nvm_access *)eeprom;
ret_val = i40e_nvmupd_command(hw, cmd, bytes, &errno); ret_val = i40e_nvmupd_command(hw, cmd, bytes, &errno);
if (ret_val && hw->aq.asq_last_status != I40E_AQ_RC_EBUSY) if (ret_val &&
((hw->aq.asq_last_status != I40E_AQ_RC_EPERM &&
hw->aq.asq_last_status != I40E_AQ_RC_EBUSY) ||
(hw->debug_mask & I40E_DEBUG_NVM)))
dev_info(&pf->pdev->dev, dev_info(&pf->pdev->dev,
"NVMUpdate write failed err=%d status=0x%x errno=%d module=%d offset=0x%x size=%d\n", "NVMUpdate write failed err=%d status=0x%x errno=%d module=%d offset=0x%x size=%d\n",
ret_val, hw->aq.asq_last_status, errno, ret_val, hw->aq.asq_last_status, errno,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment