Skip to content

Commit 8f1115b

Browse files
committed
Merge branch 'csiostor'
Praveen Madhavan says: ==================== csiostor: Remove T4 FCoE support We found a subtle issue with FCoE on T4 very late in the game and decided not to productize FCoE on T4 and therefore there are no customers that will be impacted by this change. FCoE is supported on T5 cards. Please apply on net-next since depends on previous commits. Changes in v2: - Make the commit message more clearer. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents b66a4ea + d394431 commit 8f1115b

File tree

6 files changed

+25
-506
lines changed

6 files changed

+25
-506
lines changed

drivers/scsi/csiostor/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ ccflags-y += -I$(srctree)/drivers/net/ethernet/chelsio/cxgb4
88
obj-$(CONFIG_SCSI_CHELSIO_FCOE) += csiostor.o
99

1010
csiostor-objs := csio_attr.o csio_init.o csio_lnode.o csio_scsi.o \
11-
csio_hw.o csio_hw_t4.o csio_hw_t5.o csio_isr.o \
11+
csio_hw.o csio_hw_t5.o csio_isr.o \
1212
csio_mb.o csio_rnode.o csio_wr.o

drivers/scsi/csiostor/csio_hw.c

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -60,37 +60,10 @@ int csio_msi = 2;
6060
static 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-
9063
static 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

11388
static 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

17651740
leave:
@@ -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
*/
32083183
static 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

drivers/scsi/csiostor/csio_hw_chip.h

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,14 @@
3737
#include "csio_defs.h"
3838

3939
/* Define MACRO values */
40-
#define CSIO_HW_T4 0x4000
41-
#define CSIO_T4_FCOE_ASIC 0x4600
4240
#define CSIO_HW_T5 0x5000
4341
#define CSIO_T5_FCOE_ASIC 0x5600
4442
#define CSIO_HW_CHIP_MASK 0xF000
4543

46-
#define T4_REGMAP_SIZE (160 * 1024)
4744
#define T5_REGMAP_SIZE (332 * 1024)
48-
#define FW_FNAME_T4 "cxgb4/t4fw.bin"
4945
#define FW_FNAME_T5 "cxgb4/t5fw.bin"
50-
#define FW_CFG_NAME_T4 "cxgb4/t4-config.txt"
5146
#define FW_CFG_NAME_T5 "cxgb4/t5-config.txt"
5247

53-
#define T4FW_VERSION_MAJOR 0x01
54-
#define T4FW_VERSION_MINOR 0x0B
55-
#define T4FW_VERSION_MICRO 0x1B
56-
#define T4FW_VERSION_BUILD 0x00
57-
5848
#define T5FW_VERSION_MAJOR 0x01
5949
#define T5FW_VERSION_MINOR 0x0B
6050
#define T5FW_VERSION_MICRO 0x1B
@@ -65,27 +55,15 @@
6555
#define CHELSIO_CHIP_VERSION(code) (((code) >> 12) & 0xf)
6656
#define CHELSIO_CHIP_RELEASE(code) ((code) & 0xf)
6757

68-
#define CHELSIO_T4 0x4
6958
#define CHELSIO_T5 0x5
7059

7160
enum chip_type {
72-
T4_A1 = CHELSIO_CHIP_CODE(CHELSIO_T4, 1),
73-
T4_A2 = CHELSIO_CHIP_CODE(CHELSIO_T4, 2),
74-
T4_FIRST_REV = T4_A1,
75-
T4_LAST_REV = T4_A2,
76-
7761
T5_A0 = CHELSIO_CHIP_CODE(CHELSIO_T5, 0),
7862
T5_A1 = CHELSIO_CHIP_CODE(CHELSIO_T5, 1),
7963
T5_FIRST_REV = T5_A0,
8064
T5_LAST_REV = T5_A1,
8165
};
8266

83-
/* Define static functions */
84-
static inline int csio_is_t4(uint16_t chip)
85-
{
86-
return (chip == CSIO_HW_T4);
87-
}
88-
8967
static inline int csio_is_t5(uint16_t chip)
9068
{
9169
return (chip == CSIO_HW_T5);
@@ -95,21 +73,6 @@ static inline int csio_is_t5(uint16_t chip)
9573
#define CSIO_DEVICE(devid, idx) \
9674
{ PCI_VENDOR_ID_CHELSIO, (devid), PCI_ANY_ID, PCI_ANY_ID, 0, 0, (idx) }
9775

98-
#define CSIO_HW_PIDX(hw, index) \
99-
(csio_is_t4(hw->chip_id) ? (PIDX_V(index)) : \
100-
(PIDX_T5_G(index) | DBTYPE_F))
101-
102-
#define CSIO_HW_LP_INT_THRESH(hw, val) \
103-
(csio_is_t4(hw->chip_id) ? (LP_INT_THRESH_V(val)) : \
104-
(LP_INT_THRESH_T5_V(val)))
105-
106-
#define CSIO_HW_M_LP_INT_THRESH(hw) \
107-
(csio_is_t4(hw->chip_id) ? (LP_INT_THRESH_M) : (LP_INT_THRESH_T5_M))
108-
109-
#define CSIO_MAC_INT_CAUSE_REG(hw, port) \
110-
(csio_is_t4(hw->chip_id) ? (PORT_REG(port, XGMAC_PORT_INT_CAUSE_A)) : \
111-
(T5_PORT_REG(port, MAC_PORT_INT_CAUSE_A)))
112-
11376
#include "t4fw_api.h"
11477

11578
#define FW_VERSION(chip) ( \
@@ -125,11 +88,6 @@ struct fw_info {
12588
char *fw_mod_name;
12689
struct fw_hdr fw_hdr;
12790
};
128-
#define CSIO_FW_FNAME(hw) \
129-
(csio_is_t4(hw->chip_id) ? FW_FNAME_T4 : FW_FNAME_T5)
130-
131-
#define CSIO_CF_FNAME(hw) \
132-
(csio_is_t4(hw->chip_id) ? FW_CFG_NAME_T4 : FW_CFG_NAME_T5)
13391

13492
/* Declare ENUMS */
13593
enum { MEM_EDC0, MEM_EDC1, MEM_MC, MEM_MC0 = MEM_MC, MEM_MC1 };
@@ -163,7 +121,6 @@ struct csio_hw_chip_ops {
163121
void (*chip_dfs_create_ext_mem)(struct csio_hw *);
164122
};
165123

166-
extern struct csio_hw_chip_ops t4_ops;
167124
extern struct csio_hw_chip_ops t5_ops;
168125

169126
#endif /* #ifndef __CSIO_HW_CHIP_H__ */

0 commit comments

Comments
 (0)