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/t3_hw.c | |
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/t3_hw.c')
-rw-r--r-- | drivers/net/cxgb3/t3_hw.c | 24 |
1 files changed, 21 insertions, 3 deletions
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); |