• Paul M Stillwell Jr's avatar
    ice: change devlink code to read NVM in blocks · 7b6f9462
    Paul M Stillwell Jr authored
    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: dce730f1 ("ice: add a devlink region for dumping NVM contents")
    Signed-off-by: default avatarPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
    Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    7b6f9462
ice_devlink.c 30.7 KB