]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Fix erroneous adapter reinitialization during recovery process
authorDawid Lukwinski <dawid.lukwinski@intel.com>
Fri, 15 Jul 2022 21:45:41 +0000 (14:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:14 +0000 (17:14 +0200)
commit9cc916ae5dbe16debc679d5551521fb0c7a48df8
treeb25032e8a445b1c3585a1bfd26119aca268ceab2
parentd31345b67804e844591b3445ba8acbd9266d1f8c
i40e: Fix erroneous adapter reinitialization during recovery process

[ Upstream commit 81cbe17894ac4e90cf5a4cb4116e80334cfe57fa ]

Fix an issue when driver incorrectly detects state
of recovery process and erroneously reinitializes interrupts,
which results in a kernel error and call trace message.

The issue was caused by a combination of two factors:
1. Assuming the EMP reset issued after completing
firmware recovery means the whole recovery process is complete.
2. Erroneous reinitialization of interrupt vector after detecting
the above mentioned EMP reset.

Fixes (1) by changing how recovery state change is detected
and (2) by adjusting the conditional expression to ensure using proper
interrupt reinitialization method, depending on the situation.

Fixes: bdbcceb6036b ("i40e: Introduce recovery mode support")
Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20220715214542.2968762-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_main.c