]> git.baikalelectronics.ru Git - kernel.git/commit
ice: change devlink code to read NVM in blocks
authorPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Wed, 8 Jun 2022 21:48:32 +0000 (14:48 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 12 Jul 2022 16:25:47 +0000 (09:25 -0700)
commitcc0159790967d7649d4443c1730b88741db5defa
treef89de1e5d428f29896b46a47ad0d49b43e8d642a
parente567606cfb47bf15d9399c27e552e6c61f30b7ce
ice: change devlink code to read NVM in blocks

When creating a snapshot of the NVM the driver needs to read the entire
contents from the NVM and store it. The NVM reads are protected by a lock
that is shared between the driver and the firmware.

If the driver takes too long to read the entire NVM (which can happen on
some systems) then the firmware could reclaim the lock and cause subsequent
reads from the driver to fail.

We could fix this by increasing the timeout that we pass to the firmware,
but we could end up in the same situation again if the system is slow.
Instead have the driver break the reading of the NVM into blocks that are
small enough that we have confidence that the read will complete within the
timeout time, but large enough not to cause significant AQ overhead.

Fixes: 810619f4a5d9 ("ice: add a devlink region for dumping NVM contents")
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_devlink.c