diff options
author | 2022-02-09 11:28:14 -0800 | |
---|---|---|
committer | 2022-02-10 15:27:44 +0000 | |
commit | ca2d5f1ff05955da9506055e88c4bbb71da190f1 (patch) | |
tree | 04222fd40920a60b936abde6b8d9aa542761a090 /net/switchdev/switchdev.c | |
parent | Merge branch 'ping6-cmsg' (diff) | |
download | linux-dev-ca2d5f1ff05955da9506055e88c4bbb71da190f1.tar.xz linux-dev-ca2d5f1ff05955da9506055e88c4bbb71da190f1.zip |
qed: prevent a fw assert during device shutdown
Device firmware can assert if the device shutdown path in driver
encounters an async. events from mfw (processed in
qed_mcp_handle_events()) after qed_mcp_unload_req() returns.
A call to qed_mcp_unload_req() currently marks the device as inactive
and thus stops any new events, but there is a windows where in-flight
events might still be received by the driver.
To prevent this race condition, atomically set QED_MCP_BYPASS_PROC_BIT
in qed_mcp_unload_req() to make sure qed_mcp_handle_events() ignores all
events. Wait for any event that might already be in-process to complete
by monitoring QED_MCP_IN_PROCESSING_BIT.
Signed-off-by: Pravin Kumar Ganesh Dhende <pdhende@marvell.com>
Signed-off-by: Venkata Sudheer Kumar Bhavaraju <vbhavaraju@marvell.com>
Signed-off-by: Alok Prasad <palok@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions