Skip to content

Commit

Permalink
scsi: csiostor: fail probe if fw does not support FCoE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Varun Prakash authored and Martin K. Petersen committed Aug 17, 2017
1 parent 61f0c3c commit 82f0fd0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion drivers/scsi/csiostor/csio_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3845,8 +3845,10 @@ csio_hw_start(struct csio_hw *hw)

if (csio_is_hw_ready(hw))
return 0;
else
else if (csio_match_state(hw, csio_hws_uninit))
return -EINVAL;
else
return -ENODEV;
}

int
Expand Down
12 changes: 8 additions & 4 deletions drivers/scsi/csiostor/csio_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,10 +969,14 @@ static int csio_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)

pci_set_drvdata(pdev, hw);

if (csio_hw_start(hw) != 0) {
dev_err(&pdev->dev,
"Failed to start FW, continuing in debug mode.\n");
return 0;
rv = csio_hw_start(hw);
if (rv) {
if (rv == -EINVAL) {
dev_err(&pdev->dev,
"Failed to start FW, continuing in debug mode.\n");
return 0;
}
goto err_lnode_exit;
}

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

0 comments on commit 82f0fd0

Please sign in to comment.