summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2012-10-12 21:48:21 +0000
committernp <np@FreeBSD.org>2012-10-12 21:48:21 +0000
commitaaf451dcc7f724544bd0db97d8135c9b36ad3a24 (patch)
tree0022f396923f6d6d956b35258e6ed27e402174b6
parent79e2851dcff4072cd7ef6021c86c0bc0c9c008f8 (diff)
downloadFreeBSD-src-aaf451dcc7f724544bd0db97d8135c9b36ad3a24.zip
FreeBSD-src-aaf451dcc7f724544bd0db97d8135c9b36ad3a24.tar.gz
Use global knob in the TP_PARA_REG3 register to disable congestion
drops if the user has chosen this behaviour. MFC after: 3 days
-rw-r--r--sys/dev/cxgbe/t4_main.c4
-rw-r--r--sys/dev/cxgbe/t4_sge.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index dc8a2e4..07bcba0 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -527,10 +527,6 @@ t4_attach(device_t dev)
t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, V_HPZ0(0) | V_HPZ1(2) |
V_HPZ2(4) | V_HPZ3(6));
t4_set_reg_field(sc, A_ULP_RX_CTL, F_TDDPTAGTCB, F_TDDPTAGTCB);
- t4_set_reg_field(sc, A_TP_PARA_REG3, F_TUNNELCNGDROP0 |
- F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | F_TUNNELCNGDROP3,
- F_TUNNELCNGDROP0 | F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 |
- F_TUNNELCNGDROP3);
t4_set_reg_field(sc, A_TP_PARA_REG5,
V_INDICATESIZE(M_INDICATESIZE) |
F_REARMDDPOFFSET | F_RESETDDPOFFSET,
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index 1caf443..fa33d18 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -319,6 +319,12 @@ t4_sge_init(struct adapter *sc)
t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5,
V_TIMERVALUE4(us_to_core_ticks(sc, intr_timer[4])) |
V_TIMERVALUE5(us_to_core_ticks(sc, intr_timer[5])));
+
+ if (cong_drop == 0) {
+ t4_set_reg_field(sc, A_TP_PARA_REG3, F_TUNNELCNGDROP0 |
+ F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 |
+ F_TUNNELCNGDROP3, 0);
+ }
}
v = t4_read_reg(sc, A_SGE_CONTROL);
OpenPOWER on IntegriCloud