aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishal Kulkarni <vishal@chelsio.com>2019-05-23 02:37:21 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-04 05:59:45 (GMT)
commitbf24dc2b158e6a7f3f8424d0d1d33a4bdaffa425 (patch)
tree51979872a3dbc93cccca4bfc455a949255892887
parentf29b151310b68477a22c5703f33196f761b17bc8 (diff)
downloadkernel_replicant_linux-bf24dc2b158e6a7f3f8424d0d1d33a4bdaffa425.zip
kernel_replicant_linux-bf24dc2b158e6a7f3f8424d0d1d33a4bdaffa425.tar.gz
kernel_replicant_linux-bf24dc2b158e6a7f3f8424d0d1d33a4bdaffa425.tar.bz2
cxgb4: Revert "cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size"
[ Upstream commit ab0610efabb4c4f419a531455708caf1dd29357e ] This reverts commit 2391b0030e241386d710df10e53e2cfc3c5d4fc1 which has introduced regression. Now SGE's BAR2 Doorbell/GTS Page Size is interpreted correctly in the firmware itself by using actual host page size. Hence previous commit needs to be reverted. Signed-off-by: Vishal Kulkarni <vishal@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4_hw.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index a354404..8d63eed 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -7206,10 +7206,21 @@ int t4_fixup_host_params(struct adapter *adap, unsigned int page_size,
unsigned int cache_line_size)
{
unsigned int page_shift = fls(page_size) - 1;
+ unsigned int sge_hps = page_shift - 10;
unsigned int stat_len = cache_line_size > 64 ? 128 : 64;
unsigned int fl_align = cache_line_size < 32 ? 32 : cache_line_size;
unsigned int fl_align_log = fls(fl_align) - 1;
+ t4_write_reg(adap, SGE_HOST_PAGE_SIZE_A,
+ HOSTPAGESIZEPF0_V(sge_hps) |
+ HOSTPAGESIZEPF1_V(sge_hps) |
+ HOSTPAGESIZEPF2_V(sge_hps) |
+ HOSTPAGESIZEPF3_V(sge_hps) |
+ HOSTPAGESIZEPF4_V(sge_hps) |
+ HOSTPAGESIZEPF5_V(sge_hps) |
+ HOSTPAGESIZEPF6_V(sge_hps) |
+ HOSTPAGESIZEPF7_V(sge_hps));
+
if (is_t4(adap->params.chip)) {
t4_set_reg_field(adap, SGE_CONTROL_A,
INGPADBOUNDARY_V(INGPADBOUNDARY_M) |