linux/drivers/net/ethernet/intel
Jacob Keller e872b94f9c ice: add error message when pldmfw_flash_image fails
When flashing a new firmware image onto the device, the pldmfw library
parses the image contents looking for a matching record. If no record
can be found, the function reports an error of -ENOENT. This can produce
a very confusing error message and experience for the user:

  $devlink dev flash pci/0000🆎00.0 file image.bin
  devlink answers: No such file or directory

This is because the ENOENT error code is interpreted as a missing file
or directory. The pldmfw library does not have direct access to the
extack pointer as it is generic and non-netdevice specific. The only way
that ENOENT is returned by the pldmfw library is when no record matches.

Catch this specific error and report a suitable extended ack message:

  $devlink dev flash pci/0000🆎00.0 file image.bin
  Error: ice: Firmware image has no record matching this device
  devlink answers: No such file or directory

In addition, ensure that we log an error message to the console whenever
this function fails. Because our driver specific PLDM operation
functions potentially set the extended ACK message, avoid overwriting
this with a generic message.

This change should result in an improved experience when attempting to
flash an image that does not have a compatible record.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2021-06-07 08:59:01 -07:00
..
e1000 intel: remove checker warning 2021-05-26 09:11:40 -07:00
e1000e net: e1000e: fix misspell word "retreived" 2021-05-19 12:23:25 -07:00
fm10k fm10k: move error check 2021-05-26 09:11:41 -07:00
i40e i40e: Register auxiliary devices to provide RDMA 2021-05-28 20:11:13 -07:00
iavf iavf: redefine the magic number for FDIR GTP-U header fields 2021-04-23 09:34:19 -07:00
ice ice: add error message when pldmfw_flash_image fails 2021-06-07 08:59:01 -07:00
igb igb: Fix -Wunused-const-variable warning 2021-06-01 17:00:51 -07:00
igbvf igbvf: convert to strongly typed descriptors 2021-05-26 09:11:41 -07:00
igc igc: Enable HW VLAN Insertion and HW VLAN Stripping 2021-06-04 09:14:39 -07:00
ixgb
ixgbe ixgbe: Fix out-bounds warning in ixgbe_host_interface_command() 2021-05-27 16:10:00 -07:00
ixgbevf intel: call csum functions with well formatted arguments 2021-05-26 09:11:41 -07:00
e100.c e100: handle eeprom as little endian 2021-05-26 09:11:40 -07:00
Kconfig i40e: Register auxiliary devices to provide RDMA 2021-05-28 20:11:13 -07:00
Makefile