diff options
| author | Alex Elder <[email protected]> | 2020-12-22 18:00:11 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2020-12-23 20:17:48 +0000 |
| commit | 6ffddf3b3d182d886d754cfafdf909ccb14f464b (patch) | |
| tree | 60a29a49a5603b4e86a11305531f76b376141bc2 /net/switchdev/switchdev.c | |
| parent | net: ipa: clear pending interrupts before enabling (diff) | |
| download | kernel-6ffddf3b3d182d886d754cfafdf909ccb14f464b.tar.gz kernel-6ffddf3b3d182d886d754cfafdf909ccb14f464b.zip | |
net: ipa: use state to determine channel command success
The result of issuing a channel control command should be that the
channel changes state. If enabled, a completion interrupt signals
that the channel state has changed. This interrupt is enabled by
gsi_channel_command() and disabled again after the command has
completed (or we time out).
There is a window of time--after the completion interrupt is disabled
but before the channel state is read--during which the command could
complete successfully without interrupting. This would cause the
channel to transition to the desired new state.
So whether a channel command ends via completion interrupt or
timeout, we can consider the command successful if the channel
has entered the desired state (and a failure if it has not,
regardless of the cause).
Fixes: d6c9e3f506ae8 ("net: ipa: only enable generic command completion IRQ when needed");
Signed-off-by: Alex Elder <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
