diff options
author | Divy Le Ray <divy@chelsio.com> | 2007-11-16 14:22:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:04:11 -0500 |
commit | a2604be5488095657aeb1a09c3f08d9f760132ec (patch) | |
tree | eb90977bf4c9608b2e84658466170a8146ee5830 /drivers/net/cxgb3 | |
parent | 3e5192eec8faf1df77514d2a593d14cc851a6b43 (diff) |
cxgb3 - HW set up updates
Disable PEX errors. The HW generates false positives.
Update RSS hash function to a symmetric algorithm.
Update T3C HW support
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cxgb3')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 2 | ||||
-rw-r--r-- | drivers/net/cxgb3/regs.h | 22 | ||||
-rw-r--r-- | drivers/net/cxgb3/t3_hw.c | 24 |
3 files changed, 44 insertions, 4 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index b4ee18bf35f4..f24a27bbd307 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -336,7 +336,7 @@ static void setup_rss(struct adapter *adap) | |||
336 | 336 | ||
337 | t3_config_rss(adap, F_RQFEEDBACKENABLE | F_TNLLKPEN | F_TNLMAPEN | | 337 | t3_config_rss(adap, F_RQFEEDBACKENABLE | F_TNLLKPEN | F_TNLMAPEN | |
338 | F_TNLPRTEN | F_TNL2TUPEN | F_TNL4TUPEN | | 338 | F_TNLPRTEN | F_TNL2TUPEN | F_TNL4TUPEN | |
339 | V_RRCPLCPUSIZE(6), cpus, rspq_map); | 339 | V_RRCPLCPUSIZE(6) | F_HASHTOEPLITZ, cpus, rspq_map); |
340 | } | 340 | } |
341 | 341 | ||
342 | static void init_napi(struct adapter *adap) | 342 | static void init_napi(struct adapter *adap) |
diff --git a/drivers/net/cxgb3/regs.h b/drivers/net/cxgb3/regs.h index 6e12bf4bc6cf..70e1961acee1 100644 --- a/drivers/net/cxgb3/regs.h +++ b/drivers/net/cxgb3/regs.h | |||
@@ -965,6 +965,12 @@ | |||
965 | #define V_LOCKTID(x) ((x) << S_LOCKTID) | 965 | #define V_LOCKTID(x) ((x) << S_LOCKTID) |
966 | #define F_LOCKTID V_LOCKTID(1U) | 966 | #define F_LOCKTID V_LOCKTID(1U) |
967 | 967 | ||
968 | #define S_TABLELATENCYDELTA 0 | ||
969 | #define M_TABLELATENCYDELTA 0xf | ||
970 | #define V_TABLELATENCYDELTA(x) ((x) << S_TABLELATENCYDELTA) | ||
971 | #define G_TABLELATENCYDELTA(x) \ | ||
972 | (((x) >> S_TABLELATENCYDELTA) & M_TABLELATENCYDELTA) | ||
973 | |||
968 | #define A_TP_PC_CONFIG2 0x34c | 974 | #define A_TP_PC_CONFIG2 0x34c |
969 | 975 | ||
970 | #define S_CHDRAFULL 4 | 976 | #define S_CHDRAFULL 4 |
@@ -1146,6 +1152,10 @@ | |||
1146 | #define V_RQFEEDBACKENABLE(x) ((x) << S_RQFEEDBACKENABLE) | 1152 | #define V_RQFEEDBACKENABLE(x) ((x) << S_RQFEEDBACKENABLE) |
1147 | #define F_RQFEEDBACKENABLE V_RQFEEDBACKENABLE(1U) | 1153 | #define F_RQFEEDBACKENABLE V_RQFEEDBACKENABLE(1U) |
1148 | 1154 | ||
1155 | #define S_HASHTOEPLITZ 2 | ||
1156 | #define V_HASHTOEPLITZ(x) ((x) << S_HASHTOEPLITZ) | ||
1157 | #define F_HASHTOEPLITZ V_HASHTOEPLITZ(1U) | ||
1158 | |||
1149 | #define S_DISABLE 0 | 1159 | #define S_DISABLE 0 |
1150 | 1160 | ||
1151 | #define A_TP_TM_PIO_ADDR 0x418 | 1161 | #define A_TP_TM_PIO_ADDR 0x418 |
@@ -1198,6 +1208,14 @@ | |||
1198 | 1208 | ||
1199 | #define A_TP_INT_ENABLE 0x470 | 1209 | #define A_TP_INT_ENABLE 0x470 |
1200 | 1210 | ||
1211 | #define S_FLMTXFLSTEMPTY 30 | ||
1212 | #define V_FLMTXFLSTEMPTY(x) ((x) << S_FLMTXFLSTEMPTY) | ||
1213 | #define F_FLMTXFLSTEMPTY V_FLMTXFLSTEMPTY(1U) | ||
1214 | |||
1215 | #define S_FLMRXFLSTEMPTY 29 | ||
1216 | #define V_FLMRXFLSTEMPTY(x) ((x) << S_FLMRXFLSTEMPTY) | ||
1217 | #define F_FLMRXFLSTEMPTY V_FLMRXFLSTEMPTY(1U) | ||
1218 | |||
1201 | #define A_TP_INT_CAUSE 0x474 | 1219 | #define A_TP_INT_CAUSE 0x474 |
1202 | 1220 | ||
1203 | #define A_TP_TX_MOD_Q1_Q0_RATE_LIMIT 0x8 | 1221 | #define A_TP_TX_MOD_Q1_Q0_RATE_LIMIT 0x8 |
@@ -1291,6 +1309,10 @@ | |||
1291 | 1309 | ||
1292 | #define A_ULPTX_CONFIG 0x580 | 1310 | #define A_ULPTX_CONFIG 0x580 |
1293 | 1311 | ||
1312 | #define S_CFG_CQE_SOP_MASK 1 | ||
1313 | #define V_CFG_CQE_SOP_MASK(x) ((x) << S_CFG_CQE_SOP_MASK) | ||
1314 | #define F_CFG_CQE_SOP_MASK V_CFG_CQE_SOP_MASK(1U) | ||
1315 | |||
1294 | #define S_CFG_RR_ARB 0 | 1316 | #define S_CFG_RR_ARB 0 |
1295 | #define V_CFG_RR_ARB(x) ((x) << S_CFG_RR_ARB) | 1317 | #define V_CFG_RR_ARB(x) ((x) << S_CFG_RR_ARB) |
1296 | #define F_CFG_RR_ARB V_CFG_RR_ARB(1U) | 1318 | #define F_CFG_RR_ARB V_CFG_RR_ARB(1U) |
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c index d7b991b7ed78..fab138100dff 100644 --- a/drivers/net/cxgb3/t3_hw.c +++ b/drivers/net/cxgb3/t3_hw.c | |||
@@ -1280,7 +1280,7 @@ static int t3_handle_intr_status(struct adapter *adapter, unsigned int reg, | |||
1280 | #define PCIE_INTR_MASK (F_UNXSPLCPLERRR | F_UNXSPLCPLERRC | F_PCIE_PIOPARERR |\ | 1280 | #define PCIE_INTR_MASK (F_UNXSPLCPLERRR | F_UNXSPLCPLERRC | F_PCIE_PIOPARERR |\ |
1281 | F_PCIE_WFPARERR | F_PCIE_RFPARERR | F_PCIE_CFPARERR | \ | 1281 | F_PCIE_WFPARERR | F_PCIE_RFPARERR | F_PCIE_CFPARERR | \ |
1282 | /* V_PCIE_MSIXPARERR(M_PCIE_MSIXPARERR) | */ \ | 1282 | /* V_PCIE_MSIXPARERR(M_PCIE_MSIXPARERR) | */ \ |
1283 | V_BISTERR(M_BISTERR) | F_PEXERR) | 1283 | V_BISTERR(M_BISTERR)) |
1284 | #define ULPRX_INTR_MASK F_PARERR | 1284 | #define ULPRX_INTR_MASK F_PARERR |
1285 | #define ULPTX_INTR_MASK 0 | 1285 | #define ULPTX_INTR_MASK 0 |
1286 | #define CPLSW_INTR_MASK (F_TP_FRAMING_ERROR | \ | 1286 | #define CPLSW_INTR_MASK (F_TP_FRAMING_ERROR | \ |
@@ -1383,8 +1383,16 @@ static void tp_intr_handler(struct adapter *adapter) | |||
1383 | {0} | 1383 | {0} |
1384 | }; | 1384 | }; |
1385 | 1385 | ||
1386 | static struct intr_info tp_intr_info_t3c[] = { | ||
1387 | { 0x1ffffff, "TP parity error", -1, 1 }, | ||
1388 | { F_FLMRXFLSTEMPTY, "TP out of Rx pages", -1, 1 }, | ||
1389 | { F_FLMTXFLSTEMPTY, "TP out of Tx pages", -1, 1 }, | ||
1390 | { 0 } | ||
1391 | }; | ||
1392 | |||
1386 | if (t3_handle_intr_status(adapter, A_TP_INT_CAUSE, 0xffffffff, | 1393 | if (t3_handle_intr_status(adapter, A_TP_INT_CAUSE, 0xffffffff, |
1387 | tp_intr_info, NULL)) | 1394 | adapter->params.rev < T3_REV_C ? |
1395 | tp_intr_info : tp_intr_info_t3c, NULL)) | ||
1388 | t3_fatal_err(adapter); | 1396 | t3_fatal_err(adapter); |
1389 | } | 1397 | } |
1390 | 1398 | ||
@@ -1734,7 +1742,6 @@ void t3_intr_enable(struct adapter *adapter) | |||
1734 | MC7_INTR_MASK}, | 1742 | MC7_INTR_MASK}, |
1735 | {A_MC5_DB_INT_ENABLE, MC5_INTR_MASK}, | 1743 | {A_MC5_DB_INT_ENABLE, MC5_INTR_MASK}, |
1736 | {A_ULPRX_INT_ENABLE, ULPRX_INTR_MASK}, | 1744 | {A_ULPRX_INT_ENABLE, ULPRX_INTR_MASK}, |
1737 | {A_TP_INT_ENABLE, 0x3bfffff}, | ||
1738 | {A_PM1_TX_INT_ENABLE, PMTX_INTR_MASK}, | 1745 | {A_PM1_TX_INT_ENABLE, PMTX_INTR_MASK}, |
1739 | {A_PM1_RX_INT_ENABLE, PMRX_INTR_MASK}, | 1746 | {A_PM1_RX_INT_ENABLE, PMRX_INTR_MASK}, |
1740 | {A_CIM_HOST_INT_ENABLE, CIM_INTR_MASK}, | 1747 | {A_CIM_HOST_INT_ENABLE, CIM_INTR_MASK}, |
@@ -1744,6 +1751,8 @@ void t3_intr_enable(struct adapter *adapter) | |||
1744 | adapter->slow_intr_mask = PL_INTR_MASK; | 1751 | adapter->slow_intr_mask = PL_INTR_MASK; |
1745 | 1752 | ||
1746 | t3_write_regs(adapter, intr_en_avp, ARRAY_SIZE(intr_en_avp), 0); | 1753 | t3_write_regs(adapter, intr_en_avp, ARRAY_SIZE(intr_en_avp), 0); |
1754 | t3_write_reg(adapter, A_TP_INT_ENABLE, | ||
1755 | adapter->params.rev >= T3_REV_C ? 0x2bfffff : 0x3bfffff); | ||
1747 | 1756 | ||
1748 | if (adapter->params.rev > 0) { | 1757 | if (adapter->params.rev > 0) { |
1749 | t3_write_reg(adapter, A_CPL_INTR_ENABLE, | 1758 | t3_write_reg(adapter, A_CPL_INTR_ENABLE, |
@@ -2509,6 +2518,11 @@ static void tp_config(struct adapter *adap, const struct tp_params *p) | |||
2509 | } else | 2518 | } else |
2510 | t3_set_reg_field(adap, A_TP_PARA_REG3, 0, F_TXPACEFIXED); | 2519 | t3_set_reg_field(adap, A_TP_PARA_REG3, 0, F_TXPACEFIXED); |
2511 | 2520 | ||
2521 | if (adap->params.rev == T3_REV_C) | ||
2522 | t3_set_reg_field(adap, A_TP_PC_CONFIG, | ||
2523 | V_TABLELATENCYDELTA(M_TABLELATENCYDELTA), | ||
2524 | V_TABLELATENCYDELTA(4)); | ||
2525 | |||
2512 | t3_write_reg(adap, A_TP_TX_MOD_QUEUE_WEIGHT1, 0); | 2526 | t3_write_reg(adap, A_TP_TX_MOD_QUEUE_WEIGHT1, 0); |
2513 | t3_write_reg(adap, A_TP_TX_MOD_QUEUE_WEIGHT0, 0); | 2527 | t3_write_reg(adap, A_TP_TX_MOD_QUEUE_WEIGHT0, 0); |
2514 | t3_write_reg(adap, A_TP_MOD_CHANNEL_WEIGHT, 0); | 2528 | t3_write_reg(adap, A_TP_MOD_CHANNEL_WEIGHT, 0); |
@@ -3246,6 +3260,10 @@ int t3_init_hw(struct adapter *adapter, u32 fw_params) | |||
3246 | else | 3260 | else |
3247 | t3_set_reg_field(adapter, A_PCIX_CFG, 0, F_CLIDECEN); | 3261 | t3_set_reg_field(adapter, A_PCIX_CFG, 0, F_CLIDECEN); |
3248 | 3262 | ||
3263 | if (adapter->params.rev == T3_REV_C) | ||
3264 | t3_set_reg_field(adapter, A_ULPTX_CONFIG, 0, | ||
3265 | F_CFG_CQE_SOP_MASK); | ||
3266 | |||
3249 | t3_write_reg(adapter, A_PM1_RX_CFG, 0xffffffff); | 3267 | t3_write_reg(adapter, A_PM1_RX_CFG, 0xffffffff); |
3250 | t3_write_reg(adapter, A_PM1_RX_MODE, 0); | 3268 | t3_write_reg(adapter, A_PM1_RX_MODE, 0); |
3251 | t3_write_reg(adapter, A_PM1_TX_MODE, 0); | 3269 | t3_write_reg(adapter, A_PM1_TX_MODE, 0); |