diff options
author | Praveen Madhavan <praveenm@chelsio.com> | 2015-02-03 06:48:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-04 17:00:30 -0500 |
commit | 541c571fa2fdfd4782d840276c5aedb535349075 (patch) | |
tree | e9132683265f26a31b4e501396be6c0784df8953 /drivers/scsi/csiostor | |
parent | b5057dd79c2db9a2be5306fdcdb2eae5c9c0e109 (diff) |
csiostor:Use firmware version from cxgb4/t4fw_version.h
This patch is to use firmware version macros from t4fw_version.h
and also enables 40g T5 adapter.
Signed-off-by: Praveen Madhavan <praveenm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/csiostor')
-rw-r--r-- | drivers/scsi/csiostor/csio_hw.c | 6 | ||||
-rw-r--r-- | drivers/scsi/csiostor/csio_hw_chip.h | 6 | ||||
-rw-r--r-- | drivers/scsi/csiostor/csio_mb.c | 3 |
3 files changed, 7 insertions, 8 deletions
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c index c81b06bcf827..2e66f34ebb79 100644 --- a/drivers/scsi/csiostor/csio_hw.c +++ b/drivers/scsi/csiostor/csio_hw.c | |||
@@ -1372,7 +1372,8 @@ csio_config_device_caps(struct csio_hw *hw) | |||
1372 | } | 1372 | } |
1373 | 1373 | ||
1374 | /* Validate device capabilities */ | 1374 | /* Validate device capabilities */ |
1375 | if (csio_hw_validate_caps(hw, mbp)) | 1375 | rv = csio_hw_validate_caps(hw, mbp); |
1376 | if (rv != 0) | ||
1376 | goto out; | 1377 | goto out; |
1377 | 1378 | ||
1378 | /* Don't config device capabilities if already configured */ | 1379 | /* Don't config device capabilities if already configured */ |
@@ -1776,7 +1777,8 @@ csio_hw_use_fwconfig(struct csio_hw *hw, int reset, u32 *fw_cfg_param) | |||
1776 | } | 1777 | } |
1777 | 1778 | ||
1778 | /* Validate device capabilities */ | 1779 | /* Validate device capabilities */ |
1779 | if (csio_hw_validate_caps(hw, mbp)) | 1780 | rv = csio_hw_validate_caps(hw, mbp); |
1781 | if (rv != 0) | ||
1780 | goto bye; | 1782 | goto bye; |
1781 | /* | 1783 | /* |
1782 | * Note that we're operating with parameters | 1784 | * Note that we're operating with parameters |
diff --git a/drivers/scsi/csiostor/csio_hw_chip.h b/drivers/scsi/csiostor/csio_hw_chip.h index a5f624f755df..b56a11d817be 100644 --- a/drivers/scsi/csiostor/csio_hw_chip.h +++ b/drivers/scsi/csiostor/csio_hw_chip.h | |||
@@ -45,11 +45,6 @@ | |||
45 | #define FW_FNAME_T5 "cxgb4/t5fw.bin" | 45 | #define FW_FNAME_T5 "cxgb4/t5fw.bin" |
46 | #define FW_CFG_NAME_T5 "cxgb4/t5-config.txt" | 46 | #define FW_CFG_NAME_T5 "cxgb4/t5-config.txt" |
47 | 47 | ||
48 | #define T5FW_VERSION_MAJOR 0x01 | ||
49 | #define T5FW_VERSION_MINOR 0x0B | ||
50 | #define T5FW_VERSION_MICRO 0x1B | ||
51 | #define T5FW_VERSION_BUILD 0x00 | ||
52 | |||
53 | #define CHELSIO_CHIP_CODE(version, revision) (((version) << 4) | (revision)) | 48 | #define CHELSIO_CHIP_CODE(version, revision) (((version) << 4) | (revision)) |
54 | #define CHELSIO_CHIP_FPGA 0x100 | 49 | #define CHELSIO_CHIP_FPGA 0x100 |
55 | #define CHELSIO_CHIP_VERSION(code) (((code) >> 12) & 0xf) | 50 | #define CHELSIO_CHIP_VERSION(code) (((code) >> 12) & 0xf) |
@@ -74,6 +69,7 @@ static inline int csio_is_t5(uint16_t chip) | |||
74 | { PCI_VENDOR_ID_CHELSIO, (devid), PCI_ANY_ID, PCI_ANY_ID, 0, 0, (idx) } | 69 | { PCI_VENDOR_ID_CHELSIO, (devid), PCI_ANY_ID, PCI_ANY_ID, 0, 0, (idx) } |
75 | 70 | ||
76 | #include "t4fw_api.h" | 71 | #include "t4fw_api.h" |
72 | #include "t4fw_version.h" | ||
77 | 73 | ||
78 | #define FW_VERSION(chip) ( \ | 74 | #define FW_VERSION(chip) ( \ |
79 | FW_HDR_FW_VER_MAJOR_G(chip##FW_VERSION_MAJOR) | \ | 75 | FW_HDR_FW_VER_MAJOR_G(chip##FW_VERSION_MAJOR) | \ |
diff --git a/drivers/scsi/csiostor/csio_mb.c b/drivers/scsi/csiostor/csio_mb.c index 1132c41d99ce..9451787ca7f2 100644 --- a/drivers/scsi/csiostor/csio_mb.c +++ b/drivers/scsi/csiostor/csio_mb.c | |||
@@ -327,7 +327,8 @@ csio_mb_caps_config(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, | |||
327 | } | 327 | } |
328 | 328 | ||
329 | #define CSIO_ADVERT_MASK (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\ | 329 | #define CSIO_ADVERT_MASK (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\ |
330 | FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_ANEG) | 330 | FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_40G |\ |
331 | FW_PORT_CAP_ANEG) | ||
331 | 332 | ||
332 | /* | 333 | /* |
333 | * csio_mb_port- FW PORT command helper | 334 | * csio_mb_port- FW PORT command helper |