Skip to content

Commit ab0610e

Browse files
vishalsdkdavem330
authored andcommitted
cxgb4: Revert "cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size"
This reverts commit 2391b00 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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ce8d24f commit ab0610e

File tree

1 file changed

+11
-0
lines changed
  • drivers/net/ethernet/chelsio/cxgb4

1 file changed

+11
-0
lines changed

drivers/net/ethernet/chelsio/cxgb4/t4_hw.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7253,10 +7253,21 @@ int t4_fixup_host_params(struct adapter *adap, unsigned int page_size,
72537253
unsigned int cache_line_size)
72547254
{
72557255
unsigned int page_shift = fls(page_size) - 1;
7256+
unsigned int sge_hps = page_shift - 10;
72567257
unsigned int stat_len = cache_line_size > 64 ? 128 : 64;
72577258
unsigned int fl_align = cache_line_size < 32 ? 32 : cache_line_size;
72587259
unsigned int fl_align_log = fls(fl_align) - 1;
72597260

7261+
t4_write_reg(adap, SGE_HOST_PAGE_SIZE_A,
7262+
HOSTPAGESIZEPF0_V(sge_hps) |
7263+
HOSTPAGESIZEPF1_V(sge_hps) |
7264+
HOSTPAGESIZEPF2_V(sge_hps) |
7265+
HOSTPAGESIZEPF3_V(sge_hps) |
7266+
HOSTPAGESIZEPF4_V(sge_hps) |
7267+
HOSTPAGESIZEPF5_V(sge_hps) |
7268+
HOSTPAGESIZEPF6_V(sge_hps) |
7269+
HOSTPAGESIZEPF7_V(sge_hps));
7270+
72607271
if (is_t4(adap->params.chip)) {
72617272
t4_set_reg_field(adap, SGE_CONTROL_A,
72627273
INGPADBOUNDARY_V(INGPADBOUNDARY_M) |

0 commit comments

Comments
 (0)