Commit 3b1d307b authored by Divy Le Ray's avatar Divy Le Ray Committed by Jeff Garzik

cxgb3 - Clean up HW init routine

Clean up the tp_config() routine.
Signed-off-by: default avatarDivy Le Ray <divy@chelsio.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent b5a44bcb
...@@ -2328,8 +2328,6 @@ static inline void tp_wr_indirect(struct adapter *adap, unsigned int addr, ...@@ -2328,8 +2328,6 @@ static inline void tp_wr_indirect(struct adapter *adap, unsigned int addr,
static void tp_config(struct adapter *adap, const struct tp_params *p) static void tp_config(struct adapter *adap, const struct tp_params *p)
{ {
unsigned int v;
t3_write_reg(adap, A_TP_GLOBAL_CONFIG, F_TXPACINGENABLE | F_PATHMTU | t3_write_reg(adap, A_TP_GLOBAL_CONFIG, F_TXPACINGENABLE | F_PATHMTU |
F_IPCHECKSUMOFFLOAD | F_UDPCHECKSUMOFFLOAD | F_IPCHECKSUMOFFLOAD | F_UDPCHECKSUMOFFLOAD |
F_TCPCHECKSUMOFFLOAD | V_IPTTL(64)); F_TCPCHECKSUMOFFLOAD | V_IPTTL(64));
...@@ -2348,15 +2346,11 @@ static void tp_config(struct adapter *adap, const struct tp_params *p) ...@@ -2348,15 +2346,11 @@ static void tp_config(struct adapter *adap, const struct tp_params *p)
adap->params.rev > 0 ? F_ENABLEESND : F_T3A_ENABLEESND, adap->params.rev > 0 ? F_ENABLEESND : F_T3A_ENABLEESND,
0); 0);
v = t3_read_reg(adap, A_TP_PC_CONFIG); t3_set_reg_field(adap, A_TP_PC_CONFIG,
v &= ~(F_ENABLEEPCMDAFULL | F_ENABLEOCSPIFULL); F_ENABLEEPCMDAFULL | F_ENABLEOCSPIFULL,
t3_write_reg(adap, A_TP_PC_CONFIG, v | F_TXDEFERENABLE | F_TXDEFERENABLE | F_HEARBEATDACK | F_TXCONGESTIONMODE |
F_MODULATEUNIONMODE | F_HEARBEATDACK | F_RXCONGESTIONMODE);
F_TXCONGESTIONMODE | F_RXCONGESTIONMODE); t3_set_reg_field(adap, A_TP_PC_CONFIG2, F_CHDRAFULL, 0);
v = t3_read_reg(adap, A_TP_PC_CONFIG2);
v &= ~F_CHDRAFULL;
t3_write_reg(adap, A_TP_PC_CONFIG2, v);
if (adap->params.rev > 0) { if (adap->params.rev > 0) {
tp_wr_indirect(adap, A_TP_EGRESS_CONFIG, F_REWRITEFORCETOSIZE); tp_wr_indirect(adap, A_TP_EGRESS_CONFIG, F_REWRITEFORCETOSIZE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment