octeon_ep: explicitly test for firmware ready value
Subsystems (3)
PATCH v3 1/1 octeon_ep: explicitly test for firmware ready value
The firmware ready value is 1, and get firmware ready status function should explicitly test for that value. The firmware ready value read will be 2 after driver load, and on unbind till firmware rewrites the firmware ready back to 0, the value seen by driver will be 2, which should be regarded as not ready.
---
V3:
- Removed unnecessary parenthesis around boolean return.
V2: https://lore.kernel.org/all/[email protected]/
- Fixed redundant logic
V1: https://lore.kernel.org/all/[email protected]/
drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeon_ep/octep_main.c +2 -1
@@ -1258,7 +1258,8 @@ static bool get_fw_ready_status(struct pci_dev *pdev)pci_read_config_byte (pdev, (pos +8 ), &status);dev_info (&pdev->dev,"Firmware ready status = %u\n" , status); -return status; +#define FW_STATUS_READY 1ULL +return status ==FW_STATUS_READY ; }return false; }
Signature · 1 line
2.25.1
Quoted 8 lines · Shinas Rasheed
The firmware ready value is 1, and get firmware ready status function should explicitly test for that value. The firmware ready value read will be 2 after driver load, and on unbind till firmware rewrites the firmware ready back to 0, the value seen by driver will be 2, which should be regarded as not ready.
Fixes 10c073e40469 ("octeon_ep: defer probe if firmware not ready")Signed-off-by Shinas Rasheed <[email protected]>
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 10 lines · On Thu, 7 Dec 2023 21:56:46 -0800 you wrote:
The firmware ready value is 1, and get firmware ready status function should explicitly test for that value. The firmware ready value read will be 2 after driver load, and on unbind till firmware rewrites the firmware ready back to 0, the value seen by driver will be 2, which should be regarded as not ready.
Fixes 10c073e40469 ("octeon_ep: defer probe if firmware not ready")Signed-off-by Shinas Rasheed <[email protected]>[...]
Here is the summary with links:
- [net,v3] octeon_ep: explicitly test for firmware ready value
https://git.kernel.org/netdev/net/c/284f71762241
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html