Skip to content
Commit ca2d5f1f authored by Venkata Sudheer Kumar Bhavaraju's avatar Venkata Sudheer Kumar Bhavaraju Committed by David S. Miller
Browse files

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: default avatarPravin Kumar Ganesh Dhende <pdhende@marvell.com>
Signed-off-by: default avatarVenkata Sudheer Kumar Bhavaraju <vbhavaraju@marvell.com>
Signed-off-by: default avatarAlok Prasad <palok@marvell.com>
Signed-off-by: default avatarAriel Elior <aelior@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 57ea56b0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment