diff options
author | Dave Ertman <[email protected]> | 2024-05-28 15:06:11 -0700 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-05-29 18:57:02 -0700 |
commit | a51c9b1c9ab2351e62933357fcad5bfad27f2400 (patch) | |
tree | ec24ce224507f30f2b8e4a31c854638e1d9aa4c9 /scripts/generate_rust_analyzer.py | |
parent | 2a6d8f2de2224ac46df94dc40f43f8b9701f6703 (diff) |
ice: check for unregistering correct number of devlink params
On module load, the ice driver checks for the lack of a specific PF
capability to determine if it should reduce the number of devlink params
to register. One situation when this test returns true is when the
driver loads in safe mode. The same check is not present on the unload
path when devlink params are unregistered. This results in the driver
triggering a WARN_ON in the kernel devlink code.
The current check and code path uses a reduction in the number of elements
reported in the list of params. This is fragile and not good for future
maintaining.
Change the parameters to be held in two lists, one always registered and
one dependent on the check.
Add a symmetrical check in the unload path so that the correct parameters
are unregistered as well.
Fixes: 109eb2917284 ("ice: Add tx_scheduling_layers devlink param")
CC: Lukasz Czapnik <[email protected]>
Reviewed-by: Przemek Kitszel <[email protected]>
Signed-off-by: Dave Ertman <[email protected]>
Reviewed-by: Jacob Keller <[email protected]>
Tested-by: Pucha Himasekhar Reddy <[email protected]>
Signed-off-by: Jacob Keller <[email protected]>
Link: https://lore.kernel.org/r/20240528-net-2024-05-28-intel-net-fixes-v1-8-dc8593d2bbc6@intel.com
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions