summaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2007-01-30 19:44:07 -0800
committerJeff Garzik <jeff@garzik.org>2007-02-05 16:58:50 -0500
commit3b1d307b319cce3d013801b267965ac4c31ce58c (patch)
tree60e4152b9862c80e7d54a218a2b7a0915af90969 /drivers/net/cxgb3
parentb5a44bcbf53f1af1f24e7fe0e5008eca85659220 (diff)
downloadop-kernel-dev-3b1d307b319cce3d013801b267965ac4c31ce58c.zip
op-kernel-dev-3b1d307b319cce3d013801b267965ac4c31ce58c.tar.gz
cxgb3 - Clean up HW init routine
Clean up the tp_config() routine. 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/t3_hw.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 2215400..7112bac 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -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)
{
- unsigned int v;
-
t3_write_reg(adap, A_TP_GLOBAL_CONFIG, F_TXPACINGENABLE | F_PATHMTU |
F_IPCHECKSUMOFFLOAD | F_UDPCHECKSUMOFFLOAD |
F_TCPCHECKSUMOFFLOAD | V_IPTTL(64));
@@ -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,
0);
- v = t3_read_reg(adap, A_TP_PC_CONFIG);
- v &= ~(F_ENABLEEPCMDAFULL | F_ENABLEOCSPIFULL);
- t3_write_reg(adap, A_TP_PC_CONFIG, v | F_TXDEFERENABLE |
- F_MODULATEUNIONMODE | F_HEARBEATDACK |
- F_TXCONGESTIONMODE | F_RXCONGESTIONMODE);
-
- v = t3_read_reg(adap, A_TP_PC_CONFIG2);
- v &= ~F_CHDRAFULL;
- t3_write_reg(adap, A_TP_PC_CONFIG2, v);
+ t3_set_reg_field(adap, A_TP_PC_CONFIG,
+ F_ENABLEEPCMDAFULL | F_ENABLEOCSPIFULL,
+ F_TXDEFERENABLE | F_HEARBEATDACK | F_TXCONGESTIONMODE |
+ F_RXCONGESTIONMODE);
+ t3_set_reg_field(adap, A_TP_PC_CONFIG2, F_CHDRAFULL, 0);
if (adap->params.rev > 0) {
tp_wr_indirect(adap, A_TP_EGRESS_CONFIG, F_REWRITEFORCETOSIZE);
OpenPOWER on IntegriCloud