diff options
author | 2024-02-09 22:24:30 +0100 | |
---|---|---|
committer | 2024-02-20 10:24:44 -0800 | |
commit | fc7fd1a10a9d2d38378b42e9a508da4c68018453 (patch) | |
tree | 75c4cc6816dbde990d25e79382c7e75f0c9cef5e /drivers/ufs | |
parent | ice: fix dpll input pin phase_adjust value updates (diff) | |
download | linux-fc7fd1a10a9d2d38378b42e9a508da4c68018453.tar.gz linux-fc7fd1a10a9d2d38378b42e9a508da4c68018453.tar.bz2 linux-fc7fd1a10a9d2d38378b42e9a508da4c68018453.zip |
ice: fix dpll and dpll_pin data access on PF reset
Do not allow to acquire data or alter configuration of dpll and pins
through firmware if PF reset is in progress, this would cause confusing
netlink extack errors as the firmware cannot respond or process the
request properly during the reset time.
Return (-EBUSY) and extack error for the user who tries access/modify
the config of dpll/pin through firmware during the reset time.
The PF reset and kernel access to dpll data are both asynchronous. It is
not possible to guard all the possible reset paths with any determinictic
approach. I.e., it is possible that reset starts after reset check is
performed (or if the reset would be checked after mutex is locked), but at
the same time it is not possible to wait for dpll mutex unlock in the
reset flow.
This is best effort solution to at least give a clue to the user
what is happening in most of the cases, knowing that there are possible
race conditions where the user could see a different error received
from firmware due to reset unexpectedly starting.
Test by looping execution of below steps until netlink error appears:
- perform PF reset
$ echo 1 > /sys/class/net/<ice PF>/device/reset
- i.e. try to alter/read dpll/pin config:
$ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/dpll.yaml \
--dump pin-get
Fixes: d7999f5ea64b ("ice: implement dpll interface to control cgu")
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/ufs')
0 files changed, 0 insertions, 0 deletions