summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgbe/common/t4vf_hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/cxgbe/common/t4vf_hw.c')
-rw-r--r--sys/dev/cxgbe/common/t4vf_hw.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/cxgbe/common/t4vf_hw.c b/sys/dev/cxgbe/common/t4vf_hw.c
index adbeb0e..009f34b6 100644
--- a/sys/dev/cxgbe/common/t4vf_hw.c
+++ b/sys/dev/cxgbe/common/t4vf_hw.c
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
#include "common.h"
#include "t4_regs.h"
+#include "t4_regs_values.h"
#undef msleep
#define msleep(x) do { \
@@ -130,9 +131,10 @@ int t4vf_get_sge_params(struct adapter *adapter)
sp->fl_starve_threshold = G_EGRTHRESHOLD(vals[5]) * 2 + 1;
if (is_t4(adapter))
sp->fl_starve_threshold2 = sp->fl_starve_threshold;
+ else if (is_t5(adapter))
+ sp->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(vals[5]) * 2 + 1;
else
- sp->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(vals[5]) * 2 +
- 1;
+ sp->fl_starve_threshold2 = G_T6_EGRTHRESHOLDPACKING(vals[5]) * 2 + 1;
/*
* We need the Queues/Page and Host Page Size for our VF.
@@ -168,7 +170,13 @@ int t4vf_get_sge_params(struct adapter *adapter)
*/
sp->spg_len = sp->sge_control & F_EGRSTATUSPAGESIZE ? 128 : 64;
sp->fl_pktshift = G_PKTSHIFT(sp->sge_control);
- sp->pad_boundary = 1 << (G_INGPADBOUNDARY(sp->sge_control) + 5);
+ if (chip_id(adapter) <= CHELSIO_T5) {
+ sp->pad_boundary = 1 << (G_INGPADBOUNDARY(sp->sge_control) +
+ X_INGPADBOUNDARY_SHIFT);
+ } else {
+ sp->pad_boundary = 1 << (G_INGPADBOUNDARY(sp->sge_control) +
+ X_T6_INGPADBOUNDARY_SHIFT);
+ }
if (is_t4(adapter))
sp->pack_boundary = sp->pad_boundary;
else {
OpenPOWER on IntegriCloud