netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] cxgb4: Revert "cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size"
@ 2019-05-21  3:42 Vishal Kulkarni
  2019-05-21 20:23 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Vishal Kulkarni @ 2019-05-21  3:42 UTC (permalink / raw)
  To: netdev, davem; +Cc: nirranjan, indranil, dt, Vishal Kulkarni

This reverts commit 2391b0030e241386d710df10e53e2cfc3c5d4fc1
SGE's BAR2 Doorbell/GTS Page Size is now 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>
---
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index f9b70be..93feb25 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -7253,10 +7253,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) |
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] cxgb4: Revert "cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size"
  2019-05-21  3:42 [PATCH net-next] cxgb4: Revert "cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size" Vishal Kulkarni
@ 2019-05-21 20:23 ` David Miller
  2019-05-22 14:52   ` Vishal Kulkarni
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2019-05-21 20:23 UTC (permalink / raw)
  To: vishal; +Cc: netdev, nirranjan, indranil, dt

From: Vishal Kulkarni <vishal@chelsio.com>
Date: Tue, 21 May 2019 09:12:02 +0530

> This reverts commit 2391b0030e241386d710df10e53e2cfc3c5d4fc1
> SGE's BAR2 Doorbell/GTS Page Size is now 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>

Really confusing.

First of all, I see a lot of cxgb4 patch submissions targetting net-next that
are really legitimate bug fixes.

Are you only targetting net-next to be "on the safe side" because you are
unsure of the 'net' rules?  Please don't do that.  If it's a bug fix, send
it to 'net' as appropriate.

Second, so what happens to people running older firmware?  Have you made a
completely incompatible change to the firmware behavior?  If so, you have
to version check the firmware and use the correct interpretation based upon
how the firmware verion interprets things.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] cxgb4: Revert "cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size"
  2019-05-21 20:23 ` David Miller
@ 2019-05-22 14:52   ` Vishal Kulkarni
  0 siblings, 0 replies; 3+ messages in thread
From: Vishal Kulkarni @ 2019-05-22 14:52 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Nirranjan Kirubaharan, Indranil Choudhury, dt

Hi David,

On Wednesday, May 05/22/19, 2019 at 01:53:31 +0530, David Miller wrote:
> From: Vishal Kulkarni <vishal@chelsio.com>
> Date: Tue, 21 May 2019 09:12:02 +0530
> 
> > This reverts commit 2391b0030e241386d710df10e53e2cfc3c5d4fc1
> > SGE's BAR2 Doorbell/GTS Page Size is now 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>
> 
> Really confusing.
> 
> First of all, I see a lot of cxgb4 patch submissions targetting net-next that
> are really legitimate bug fixes.
> 
> Are you only targetting net-next to be "on the safe side" because you are
> unsure of the 'net' rules?  Please don't do that.  If it's a bug fix, send
> it to 'net' as appropriate.

My apologies. I will retarget to 'net' and resend.

> 
> Second, so what happens to people running older firmware?  Have you made a
> completely incompatible change to the firmware behavior?  If so, you have
> to version check the firmware and use the correct interpretation based upon
> how the firmware verion interprets things.

The fix in the commit 2391b0030e241386d710df10e53e2cfc3c5d4fc1 is wrong
and introduced regression. The correct fix is done in the firmware and 
hence it needs to be reverted. The changes done in firmware is compatible.

> 
> Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-22 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-21  3:42 [PATCH net-next] cxgb4: Revert "cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size" Vishal Kulkarni
2019-05-21 20:23 ` David Miller
2019-05-22 14:52   ` Vishal Kulkarni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).