csiostor:Use firmware version from cxgb4/t4fw_version.h
authorPraveen Madhavan <praveenm@chelsio.com>
Tue, 3 Feb 2015 11:48:26 +0000 (17:18 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Feb 2015 22:00:30 +0000 (14:00 -0800)
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>
drivers/scsi/csiostor/csio_hw.c
drivers/scsi/csiostor/csio_hw_chip.h
drivers/scsi/csiostor/csio_mb.c

index c81b06bcf827b8b1fb261c1f360a2ce3d14e3d93..2e66f34ebb79c9caba0b40027e412b17d85dcce6 100644 (file)
@@ -1372,7 +1372,8 @@ csio_config_device_caps(struct csio_hw *hw)
        }
 
        /* Validate device capabilities */
-       if (csio_hw_validate_caps(hw, mbp))
+       rv = csio_hw_validate_caps(hw, mbp);
+       if (rv != 0)
                goto out;
 
        /* 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)
        }
 
        /* Validate device capabilities */
-       if (csio_hw_validate_caps(hw, mbp))
+       rv = csio_hw_validate_caps(hw, mbp);
+       if (rv != 0)
                goto bye;
        /*
         * Note that we're operating with parameters
index a5f624f755df0f0eee29b3169b4d13dc4ebdace5..b56a11d817be32318976b15111dfcee8b9e58bcb 100644 (file)
 #define FW_FNAME_T5                            "cxgb4/t5fw.bin"
 #define FW_CFG_NAME_T5                         "cxgb4/t5-config.txt"
 
-#define T5FW_VERSION_MAJOR 0x01
-#define T5FW_VERSION_MINOR 0x0B
-#define T5FW_VERSION_MICRO 0x1B
-#define T5FW_VERSION_BUILD 0x00
-
 #define CHELSIO_CHIP_CODE(version, revision) (((version) << 4) | (revision))
 #define CHELSIO_CHIP_FPGA          0x100
 #define CHELSIO_CHIP_VERSION(code) (((code) >> 12) & 0xf)
@@ -74,6 +69,7 @@ static inline int csio_is_t5(uint16_t chip)
        { PCI_VENDOR_ID_CHELSIO, (devid), PCI_ANY_ID, PCI_ANY_ID, 0, 0, (idx) }
 
 #include "t4fw_api.h"
+#include "t4fw_version.h"
 
 #define FW_VERSION(chip) ( \
                FW_HDR_FW_VER_MAJOR_G(chip##FW_VERSION_MAJOR) | \
index 1132c41d99cebc80026b8254b82bad0b03209d4c..9451787ca7f299715a97e34692315d69e7968910 100644 (file)
@@ -327,7 +327,8 @@ csio_mb_caps_config(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo,
 }
 
 #define CSIO_ADVERT_MASK     (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\
-                             FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_ANEG)
+                             FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_40G |\
+                             FW_PORT_CAP_ANEG)
 
 /*
  * csio_mb_port- FW PORT command helper