@@ -60,37 +60,10 @@ int csio_msi = 2;
6060static int dev_num ;
6161
6262/* FCoE Adapter types & its description */
63- static const struct csio_adap_desc csio_t4_fcoe_adapters [] = {
64- {"T440-Dbg 10G" , "Chelsio T440-Dbg 10G [FCoE]" },
65- {"T420-CR 10G" , "Chelsio T420-CR 10G [FCoE]" },
66- {"T422-CR 10G/1G" , "Chelsio T422-CR 10G/1G [FCoE]" },
67- {"T440-CR 10G" , "Chelsio T440-CR 10G [FCoE]" },
68- {"T420-BCH 10G" , "Chelsio T420-BCH 10G [FCoE]" },
69- {"T440-BCH 10G" , "Chelsio T440-BCH 10G [FCoE]" },
70- {"T440-CH 10G" , "Chelsio T440-CH 10G [FCoE]" },
71- {"T420-SO 10G" , "Chelsio T420-SO 10G [FCoE]" },
72- {"T420-CX4 10G" , "Chelsio T420-CX4 10G [FCoE]" },
73- {"T420-BT 10G" , "Chelsio T420-BT 10G [FCoE]" },
74- {"T404-BT 1G" , "Chelsio T404-BT 1G [FCoE]" },
75- {"B420-SR 10G" , "Chelsio B420-SR 10G [FCoE]" },
76- {"B404-BT 1G" , "Chelsio B404-BT 1G [FCoE]" },
77- {"T480-CR 10G" , "Chelsio T480-CR 10G [FCoE]" },
78- {"T440-LP-CR 10G" , "Chelsio T440-LP-CR 10G [FCoE]" },
79- {"AMSTERDAM 10G" , "Chelsio AMSTERDAM 10G [FCoE]" },
80- {"HUAWEI T480 10G" , "Chelsio HUAWEI T480 10G [FCoE]" },
81- {"HUAWEI T440 10G" , "Chelsio HUAWEI T440 10G [FCoE]" },
82- {"HUAWEI STG 10G" , "Chelsio HUAWEI STG 10G [FCoE]" },
83- {"ACROMAG XAUI 10G" , "Chelsio ACROMAG XAUI 10G [FCoE]" },
84- {"ACROMAG SFP+ 10G" , "Chelsio ACROMAG SFP+ 10G [FCoE]" },
85- {"QUANTA SFP+ 10G" , "Chelsio QUANTA SFP+ 10G [FCoE]" },
86- {"HUAWEI 10Gbase-T" , "Chelsio HUAWEI 10Gbase-T [FCoE]" },
87- {"HUAWEI T4TOE 10G" , "Chelsio HUAWEI T4TOE 10G [FCoE]" }
88- };
89-
9063static const struct csio_adap_desc csio_t5_fcoe_adapters [] = {
9164 {"T580-Dbg 10G" , "Chelsio T580-Dbg 10G [FCoE]" },
9265 {"T520-CR 10G" , "Chelsio T520-CR 10G [FCoE]" },
93- {"T522-CR 10G/1G" , "Chelsio T452 -CR 10G/1G [FCoE]" },
66+ {"T522-CR 10G/1G" , "Chelsio T522 -CR 10G/1G [FCoE]" },
9467 {"T540-CR 10G" , "Chelsio T540-CR 10G [FCoE]" },
9568 {"T520-BCH 10G" , "Chelsio T520-BCH 10G [FCoE]" },
9669 {"T540-BCH 10G" , "Chelsio T540-BCH 10G [FCoE]" },
@@ -107,7 +80,9 @@ static const struct csio_adap_desc csio_t5_fcoe_adapters[] = {
10780 {"T580-LP-CR 40G" , "Chelsio T580-LP-CR 40G [FCoE]" },
10881 {"T520-LL-CR 10G" , "Chelsio T520-LL-CR 10G [FCoE]" },
10982 {"T560-CR 40G" , "Chelsio T560-CR 40G [FCoE]" },
110- {"T580-CR 40G" , "Chelsio T580-CR 40G [FCoE]" }
83+ {"T580-CR 40G" , "Chelsio T580-CR 40G [FCoE]" },
84+ {"T580-SO 40G" , "Chelsio T580-SO 40G [FCoE]" },
85+ {"T502-BT 1G" , "Chelsio T502-BT 1G [FCoE]" }
11186};
11287
11388static void csio_mgmtm_cleanup (struct csio_mgmtm * );
@@ -1716,9 +1691,9 @@ csio_hw_flash_config(struct csio_hw *hw, u32 *fw_cfg_param, char *path)
17161691 uint32_t * cfg_data ;
17171692 int value_to_add = 0 ;
17181693
1719- if (request_firmware (& cf , CSIO_CF_FNAME ( hw ) , dev ) < 0 ) {
1694+ if (request_firmware (& cf , FW_CFG_NAME_T5 , dev ) < 0 ) {
17201695 csio_err (hw , "could not find config file %s, err: %d\n" ,
1721- CSIO_CF_FNAME ( hw ) , ret );
1696+ FW_CFG_NAME_T5 , ret );
17221697 return - ENOENT ;
17231698 }
17241699
@@ -1758,8 +1733,8 @@ csio_hw_flash_config(struct csio_hw *hw, u32 *fw_cfg_param, char *path)
17581733 }
17591734 if (ret == 0 ) {
17601735 csio_info (hw , "config file upgraded to %s\n" ,
1761- CSIO_CF_FNAME ( hw ) );
1762- snprintf (path , 64 , "%s%s" , "/lib/firmware/" , CSIO_CF_FNAME ( hw ) );
1736+ FW_CFG_NAME_T5 );
1737+ snprintf (path , 64 , "%s%s" , "/lib/firmware/" , FW_CFG_NAME_T5 );
17631738 }
17641739
17651740leave :
@@ -2123,9 +2098,9 @@ csio_hw_flash_fw(struct csio_hw *hw, int *reset)
21232098 return - EINVAL ;
21242099 }
21252100
2126- if (request_firmware (& fw , CSIO_FW_FNAME ( hw ) , dev ) < 0 ) {
2101+ if (request_firmware (& fw , FW_FNAME_T5 , dev ) < 0 ) {
21272102 csio_err (hw , "could not find firmware image %s, err: %d\n" ,
2128- CSIO_FW_FNAME ( hw ) , ret );
2103+ FW_FNAME_T5 , ret );
21292104 return - EINVAL ;
21302105 }
21312106
@@ -3207,7 +3182,7 @@ static void csio_ncsi_intr_handler(struct csio_hw *hw)
32073182 */
32083183static void csio_xgmac_intr_handler (struct csio_hw * hw , int port )
32093184{
3210- uint32_t v = csio_rd_reg32 (hw , CSIO_MAC_INT_CAUSE_REG ( hw , port ));
3185+ uint32_t v = csio_rd_reg32 (hw , T5_PORT_REG ( port , MAC_PORT_INT_CAUSE_A ));
32113186
32123187 v &= TXFIFO_PRTY_ERR_F | RXFIFO_PRTY_ERR_F ;
32133188 if (!v )
@@ -3217,7 +3192,7 @@ static void csio_xgmac_intr_handler(struct csio_hw *hw, int port)
32173192 csio_fatal (hw , "XGMAC %d Tx FIFO parity error\n" , port );
32183193 if (v & RXFIFO_PRTY_ERR_F )
32193194 csio_fatal (hw , "XGMAC %d Rx FIFO parity error\n" , port );
3220- csio_wr_reg32 (hw , v , CSIO_MAC_INT_CAUSE_REG ( hw , port ));
3195+ csio_wr_reg32 (hw , v , T5_PORT_REG ( port , MAC_PORT_INT_CAUSE_A ));
32213196 csio_hw_fatal_err (hw );
32223197}
32233198
@@ -3966,13 +3941,7 @@ csio_hw_set_description(struct csio_hw *hw, uint16_t ven_id, uint16_t dev_id)
39663941 prot_type = (dev_id & CSIO_ASIC_DEVID_PROTO_MASK );
39673942 adap_type = (dev_id & CSIO_ASIC_DEVID_TYPE_MASK );
39683943
3969- if (prot_type == CSIO_T4_FCOE_ASIC ) {
3970- memcpy (hw -> hw_ver ,
3971- csio_t4_fcoe_adapters [adap_type ].model_no , 16 );
3972- memcpy (hw -> model_desc ,
3973- csio_t4_fcoe_adapters [adap_type ].description ,
3974- 32 );
3975- } else if (prot_type == CSIO_T5_FCOE_ASIC ) {
3944+ if (prot_type == CSIO_T5_FCOE_ASIC ) {
39763945 memcpy (hw -> hw_ver ,
39773946 csio_t5_fcoe_adapters [adap_type ].model_no , 16 );
39783947 memcpy (hw -> model_desc ,
@@ -4009,8 +3978,8 @@ csio_hw_init(struct csio_hw *hw)
40093978
40103979 strcpy (hw -> name , CSIO_HW_NAME );
40113980
4012- /* Initialize the HW chip ops with T4/ T5 specific ops */
4013- hw -> chip_ops = csio_is_t4 ( hw -> chip_id ) ? & t4_ops : & t5_ops ;
3981+ /* Initialize the HW chip ops T5 specific ops */
3982+ hw -> chip_ops = & t5_ops ;
40143983
40153984 /* Set the model & its description */
40163985
0 commit comments