cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size
authorArjun Vynipadath <arjun@chelsio.com>
Fri, 16 Nov 2018 03:45:42 +0000 (09:15 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Nov 2018 04:36:25 +0000 (20:36 -0800)
The SGE Host Page Size has nothing to do with the actual
Host Page Size. It's the SGE's BAR2 Doorbell/GTS Page Size
for interpreting the SGE Ingress/Egress Queue per Page values.
Firmware reads all of these things and makes all the
subsequent changes necessary. The Host Driver uses the SGE
Host Page Size in order to properly calculate BAR2 Offsets.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c

index cb523949c81221e91daa73dd64a6eebc6549ca6a..fc6a0878983548d32ce653aa0d1fe62471764734 100644 (file)
@@ -7141,21 +7141,10 @@ 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) |