diff options
author | Varun Prakash <varun@chelsio.com> | 2017-06-01 12:48:33 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-12 20:48:05 -0400 |
commit | 96e6c633ec48ca487cc150d77810ac500bab35f8 (patch) | |
tree | 6cd7602b63abbf64d6f8365969fbc8f217ad3e9a /drivers/scsi/csiostor/csio_hw.c | |
parent | 3011b4826891244a4c8a8c668251705a1268f650 (diff) | |
download | linux-96e6c633ec48ca487cc150d77810ac500bab35f8.tar.gz linux-96e6c633ec48ca487cc150d77810ac500bab35f8.tar.bz2 linux-96e6c633ec48ca487cc150d77810ac500bab35f8.zip |
scsi: csiostor: add check for supported fw version
T6 FCoE support is added in fw version 1.16.45.0 so return error if fw
version < 1.16.45.0 for T6 adapters.
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/csiostor/csio_hw.c')
-rw-r--r-- | drivers/scsi/csiostor/csio_hw.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c index c6e18140759c..2029ad225121 100644 --- a/drivers/scsi/csiostor/csio_hw.c +++ b/drivers/scsi/csiostor/csio_hw.c @@ -2068,6 +2068,17 @@ csio_hw_flash_fw(struct csio_hw *hw, int *reset) return ret; } +static int csio_hw_check_fwver(struct csio_hw *hw) +{ + if (csio_is_t6(hw->pdev->device & CSIO_HW_CHIP_MASK) && + (hw->fwrev < CSIO_MIN_T6_FW)) { + csio_hw_print_fw_version(hw, "T6 unsupported fw"); + return -1; + } + + return 0; +} + /* * csio_hw_configure - Configure HW * @hw - HW module @@ -2135,6 +2146,10 @@ csio_hw_configure(struct csio_hw *hw) if (rv != 0) goto out; + rv = csio_hw_check_fwver(hw); + if (rv < 0) + goto out; + /* If the firmware doesn't support Configuration Files, * return an error. */ @@ -2162,6 +2177,10 @@ csio_hw_configure(struct csio_hw *hw) } } else { + rv = csio_hw_check_fwver(hw); + if (rv < 0) + goto out; + if (hw->fw_state == CSIO_DEV_STATE_INIT) { hw->flags |= CSIO_HWF_USING_SOFT_PARAMS; |