Skip to content

Commit 284f717

Browse files
shinas-marvelldavem330
authored andcommitted
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: 10c073e ("octeon_ep: defer probe if firmware not ready") Signed-off-by: Shinas Rasheed <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 125f1c7 commit 284f717

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/marvell/octeon_ep/octep_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,8 @@ static bool get_fw_ready_status(struct pci_dev *pdev)
12651265

12661266
pci_read_config_byte(pdev, (pos + 8), &status);
12671267
dev_info(&pdev->dev, "Firmware ready status = %u\n", status);
1268-
return status;
1268+
#define FW_STATUS_READY 1ULL
1269+
return status == FW_STATUS_READY;
12691270
}
12701271
return false;
12711272
}

0 commit comments

Comments
 (0)