diff mbox

cxgb4: allow large buffer size to have page size

Message ID 1387820069-13623-1-git-send-email-cascardo@linux.vnet.ibm.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Thadeu Lima de Souza Cascardo Dec. 23, 2013, 5:34 p.m. UTC
Since commit 52367a763d8046190754ab43743e42638564a2d1
("cxgb4/cxgb4vf: Code cleanup to enable T4 Configuration File support"),
we have failures like this during cxgb4 probe:

cxgb4 0000:01:00.4: bad SGE FL page buffer sizes [65536, 65536]
cxgb4: probe of 0000:01:00.4 failed with error -22

This happens whenever software parameters are used, without a
configuration file. That happens when the hardware was already
initialized (after kexec, or after csiostor is loaded).

It happens that these values are acceptable, rendering fl_pg_order equal
to 0, which is the case of a hard init when the page size is equal or
larger than 65536.

Accepting fl_large_pg equal to fl_small_pg solves the issue, and
shouldn't cause any trouble besides a possible performance reduction
when smaller pages are used. And that can be fixed by a configuration
file.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
---
 drivers/net/ethernet/chelsio/cxgb4/sge.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Miller Dec. 31, 2013, 9:54 p.m. UTC | #1
From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Mon, 23 Dec 2013 15:34:29 -0200

> Since commit 52367a763d8046190754ab43743e42638564a2d1
> ("cxgb4/cxgb4vf: Code cleanup to enable T4 Configuration File support"),
> we have failures like this during cxgb4 probe:
> 
> cxgb4 0000:01:00.4: bad SGE FL page buffer sizes [65536, 65536]
> cxgb4: probe of 0000:01:00.4 failed with error -22
> 
> This happens whenever software parameters are used, without a
> configuration file. That happens when the hardware was already
> initialized (after kexec, or after csiostor is loaded).
> 
> It happens that these values are acceptable, rendering fl_pg_order equal
> to 0, which is the case of a hard init when the page size is equal or
> larger than 65536.
> 
> Accepting fl_large_pg equal to fl_small_pg solves the issue, and
> shouldn't cause any trouble besides a possible performance reduction
> when smaller pages are used. And that can be fixed by a configuration
> file.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>

Can I get a review from one of the cxgb4 driver maintainers?

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
David Miller Jan. 4, 2014, 12:28 a.m. UTC | #2
From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Mon, 23 Dec 2013 15:34:29 -0200

> Since commit 52367a763d8046190754ab43743e42638564a2d1
> ("cxgb4/cxgb4vf: Code cleanup to enable T4 Configuration File support"),
> we have failures like this during cxgb4 probe:
> 
> cxgb4 0000:01:00.4: bad SGE FL page buffer sizes [65536, 65536]
> cxgb4: probe of 0000:01:00.4 failed with error -22
> 
> This happens whenever software parameters are used, without a
> configuration file. That happens when the hardware was already
> initialized (after kexec, or after csiostor is loaded).
> 
> It happens that these values are acceptable, rendering fl_pg_order equal
> to 0, which is the case of a hard init when the page size is equal or
> larger than 65536.
> 
> Accepting fl_large_pg equal to fl_small_pg solves the issue, and
> shouldn't cause any trouble besides a possible performance reduction
> when smaller pages are used. And that can be fixed by a configuration
> file.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>

I've given the cxgb4 maintainers more than a week to get around to reviewing
this, but they haven't.

It's entirely unreasonable for you to have to wait just because they haven't
done so.

So I've applied your patch, thank you.
--
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
diff mbox

Patch

diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c
index cc380c3..cc3511a 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
@@ -2581,7 +2581,7 @@  static int t4_sge_init_soft(struct adapter *adap)
 	#undef READ_FL_BUF
 
 	if (fl_small_pg != PAGE_SIZE ||
-	    (fl_large_pg != 0 && (fl_large_pg <= fl_small_pg ||
+	    (fl_large_pg != 0 && (fl_large_pg < fl_small_pg ||
 				  (fl_large_pg & (fl_large_pg-1)) != 0))) {
 		dev_err(adap->pdev_dev, "bad SGE FL page buffer sizes [%d, %d]\n",
 			fl_small_pg, fl_large_pg);