Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Varun Prakash and committed by
Martin K. Petersen
82f0fd06 61f0c3c7

+11 -5
+3 -1
drivers/scsi/csiostor/csio_hw.c
··· 3845 3845 3846 3846 if (csio_is_hw_ready(hw)) 3847 3847 return 0; 3848 - else 3848 + else if (csio_match_state(hw, csio_hws_uninit)) 3849 3849 return -EINVAL; 3850 + else 3851 + return -ENODEV; 3850 3852 } 3851 3853 3852 3854 int
+8 -4
drivers/scsi/csiostor/csio_init.c
··· 969 969 970 970 pci_set_drvdata(pdev, hw); 971 971 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; 976 980 } 977 981 978 982 sprintf(hw->fwrev_str, "%u.%u.%u.%u\n",