Commit 284f7176 authored by Shinas Rasheed's avatar Shinas Rasheed Committed by David S. Miller

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: 10c073e4 ("octeon_ep: defer probe if firmware not ready")
Signed-off-by: default avatarShinas Rasheed <srasheed@marvell.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 125f1c7f
...@@ -1265,7 +1265,8 @@ static bool get_fw_ready_status(struct pci_dev *pdev) ...@@ -1265,7 +1265,8 @@ static bool get_fw_ready_status(struct pci_dev *pdev)
pci_read_config_byte(pdev, (pos + 8), &status); pci_read_config_byte(pdev, (pos + 8), &status);
dev_info(&pdev->dev, "Firmware ready status = %u\n", 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; return false;
} }
......
Markdown is supported
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