Skip to content

Commit 82f0fd0

Browse files
Varun Prakashmartinkpetersen
authored andcommitted
scsi: csiostor: fail probe if fw does not support FCoE
Fail probe if FCoE capability is not enabled in the firmware. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 61f0c3c commit 82f0fd0

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

drivers/scsi/csiostor/csio_hw.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3845,8 +3845,10 @@ csio_hw_start(struct csio_hw *hw)
38453845

38463846
if (csio_is_hw_ready(hw))
38473847
return 0;
3848-
else
3848+
else if (csio_match_state(hw, csio_hws_uninit))
38493849
return -EINVAL;
3850+
else
3851+
return -ENODEV;
38503852
}
38513853

38523854
int

drivers/scsi/csiostor/csio_init.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -969,10 +969,14 @@ static int csio_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
969969

970970
pci_set_drvdata(pdev, hw);
971971

972-
if (csio_hw_start(hw) != 0) {
973-
dev_err(&pdev->dev,
974-
"Failed to start FW, continuing in debug mode.\n");
975-
return 0;
972+
rv = csio_hw_start(hw);
973+
if (rv) {
974+
if (rv == -EINVAL) {
975+
dev_err(&pdev->dev,
976+
"Failed to start FW, continuing in debug mode.\n");
977+
return 0;
978+
}
979+
goto err_lnode_exit;
976980
}
977981

978982
sprintf(hw->fwrev_str, "%u.%u.%u.%u\n",

0 commit comments

Comments
 (0)