diff options
author | Shinas Rasheed <srasheed@marvell.com> | 2023-12-07 21:56:46 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-12-11 10:00:59 +0000 |
commit | 284f717622417cb267e344a9174f8e5698d1e3c1 (patch) | |
tree | 2067784da8e4167227fd6ff08c00cc768a6e6108 | |
parent | 125f1c7f26ffcdbf96177abe75b70c1a6ceb17bc (diff) |
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.
Fixes: 10c073e40469 ("octeon_ep: defer probe if firmware not ready")
Signed-off-by: Shinas Rasheed <srasheed@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c index a2b5a3f8df93..a9bdf3283a85 100644 --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c @@ -1265,7 +1265,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; } |