Patchwork [net] cxgb4: Fix initialization of SGE_CONTROL register

login
register
mail settings
Submitter Vipul Pandya
Date Nov. 7, 2012, 1:45 p.m.
Message ID <1352295946-32146-1-git-send-email-vipul@chelsio.com>
Download mbox | patch
Permalink /patch/197672/
State Accepted
Delegated to: David Miller
Headers show

Comments

Vipul Pandya - Nov. 7, 2012, 1:45 p.m.
INGPADBOUNDARY_MASK is already shifted. No need to shift it again. On reloading
a driver it was resulting in a bad SGE FL MTU sizes [1536, 9088] error. This
only causes an issue on systems that have L1 cache size of 32B, 128B, 512B,
2048B or 4096B.

Signed-off-by: Jay Hernandez <jay@chelsio.com>
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
David Miller - Nov. 8, 2012, 12:02 a.m.
From: Vipul Pandya <vipul@chelsio.com>
Date: Wed,  7 Nov 2012 19:15:46 +0530

> INGPADBOUNDARY_MASK is already shifted. No need to shift it again. On reloading
> a driver it was resulting in a bad SGE FL MTU sizes [1536, 9088] error. This
> only causes an issue on systems that have L1 cache size of 32B, 128B, 512B,
> 2048B or 4096B.
> 
> Signed-off-by: Jay Hernandez <jay@chelsio.com>
> Signed-off-by: Vipul Pandya <vipul@chelsio.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 01fa5b7..730ae2c 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -2831,7 +2831,7 @@  int t4_fixup_host_params(struct adapter *adap, unsigned int page_size,
 		     HOSTPAGESIZEPF7(sge_hps));
 
 	t4_set_reg_field(adap, SGE_CONTROL,
-			 INGPADBOUNDARY(INGPADBOUNDARY_MASK) |
+			 INGPADBOUNDARY_MASK |
 			 EGRSTATUSPAGESIZE_MASK,
 			 INGPADBOUNDARY(fl_align_log - 5) |
 			 EGRSTATUSPAGESIZE(stat_len != 64));