cxgbe(4): Set up fl_starve_threshold2 accurately for T6.

Sponsored by:	Chelsio Communications
This commit is contained in:
Navdeep Parhar 2016-09-11 16:06:17 +00:00
parent cf1c47763f
commit 774168be39
2 changed files with 6 additions and 3 deletions

View file

@ -7866,8 +7866,10 @@ int t4_init_sge_params(struct adapter *adapter)
sp->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1;
if (is_t4(adapter))
sp->fl_starve_threshold2 = sp->fl_starve_threshold;
else
else if (is_t5(adapter))
sp->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(r) * 2 + 1;
else
sp->fl_starve_threshold2 = G_T6_EGRTHRESHOLDPACKING(r) * 2 + 1;
/* egress queues: log2 of # of doorbells per BAR2 page */
r = t4_read_reg(adapter, A_SGE_EGRESS_QUEUES_PER_PAGE_PF);

View file

@ -130,9 +130,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.