Skip to content

Commit

Permalink
octeon_ep: explicitly test for firmware ready value
Browse files Browse the repository at this point in the history
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: 10c073e ("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>
  • Loading branch information
Shinas Rasheed authored and David S. Miller committed Dec 11, 2023
1 parent 125f1c7 commit 284f717
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/marvell/octeon_ep/octep_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 284f717

Please sign in to comment.