public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit
@ 2008-10-13  6:06 Grant Grundler
  2008-10-13  6:09 ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Grant Grundler @ 2008-10-13  6:06 UTC (permalink / raw)
  To: linux-driver; +Cc: netdev, ron.mercer, linux-ia64

QLGE driver only supports 4k, 8k, and 64k pages.
Default page size on ia64 is 16k. Compile fails with:
drivers/net/qlge/qlge.h:1118: error: 'TX_DESC_PER_OAL' undeclared here (not in a function)

Patch below makes the cause of the compile failure obvious.
(Better would be to support 16k pages but I don't have the HW or interest.)

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>


diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index c37ea43..cf68503 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -60,6 +60,8 @@
 #define TX_DESC_PER_OAL ((MAX_SKB_FRAGS - TX_DESC_PER_IOCB) + 2)
 #elif (PAGE_SHIFT = 16)	/* 64k pages */
 #define TX_DESC_PER_OAL 0
+#else
+#error QLGE Driver only supports 4k, 8k, or 64k CPU page size.
 #endif
 
 #define DB_PAGE_SIZE 4096

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

* Re: [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit
  2008-10-13  6:06 [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit Grant Grundler
@ 2008-10-13  6:09 ` David Miller
  2008-10-14  1:54   ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure Ron Mercer
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2008-10-13  6:09 UTC (permalink / raw)
  To: grundler; +Cc: linux-driver, netdev, ron.mercer, linux-ia64

From: Grant Grundler <grundler@parisc-linux.org>
Date: Mon, 13 Oct 2008 00:06:15 -0600

> QLGE driver only supports 4k, 8k, and 64k pages.
> Default page size on ia64 is 16k. Compile fails with:
> drivers/net/qlge/qlge.h:1118: error: 'TX_DESC_PER_OAL' undeclared here (not in a function)
> 
> Patch below makes the cause of the compile failure obvious.
> (Better would be to support 16k pages but I don't have the HW or interest.)
> 
> Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

I would rather, at this point, give the qlge guys a day or two to
try and add support for other page sizes if that is possible.

If it isn't possible, I'd rather see a Kconfig guard, a compile
failure is really not acceptable.

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

* Re: [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure
  2008-10-13  6:09 ` David Miller
@ 2008-10-14  1:54   ` Ron Mercer
  2008-10-14  2:03     ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Ron Mercer @ 2008-10-14  1:54 UTC (permalink / raw)
  To: David Miller; +Cc: grundler, linux-driver, netdev, linux-ia64

Dave/Grant,
I sent this earlier today but didn't see it on the netdev list.
Thanks, Ron

This ASIC does support all page sizes. For 4k and 8k page size the TX control block needs an external scatter gather list.  For page sizes larger than 8k the max frags is satisfied by the original TX control block.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
 drivers/net/qlge/qlge.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index c37ea43..38116f9 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -58,7 +58,7 @@
  */
 #if (PAGE_SHIFT = 12) || (PAGE_SHIFT = 13)	/* 4k & 8k pages */
 #define TX_DESC_PER_OAL ((MAX_SKB_FRAGS - TX_DESC_PER_IOCB) + 2)
-#elif (PAGE_SHIFT = 16)	/* 64k pages */
+#else /* all other page sizes */
 #define TX_DESC_PER_OAL 0
 #endif
 
-- 
1.6.0


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

* Re: [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit
  2008-10-14  1:54   ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure Ron Mercer
@ 2008-10-14  2:03     ` David Miller
  2008-10-14  2:19       ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure Matthew Wilcox
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2008-10-14  2:03 UTC (permalink / raw)
  To: ron.mercer; +Cc: grundler, linux-driver, netdev, linux-ia64

From: Ron Mercer <ron.mercer@qlogic.com>
Date: Mon, 13 Oct 2008 18:54:55 -0700

> Dave/Grant,
> I sent this earlier today but didn't see it on the netdev list.
> Thanks, Ron
> 
> This ASIC does support all page sizes. For 4k and 8k page size the TX control block needs an external scatter gather list.  For page sizes larger than 8k the max frags is satisfied by the original TX control block.
> 
> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>

I'm not applying this.  I _explicitly_ said I would not apply a
solution like this.

I waited for you guys all day for this?!?!

We need to find a way to make this a Kconfig dependency.

Build failures are absolutely unacceptable.

People do randconfig, allyesconfig, allmodconfig, etc. for build
regression testing and that has to work no matter what page size gets
selected or is the default for a given platform.


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

* Re: [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure
  2008-10-14  2:03     ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit David Miller
@ 2008-10-14  2:19       ` Matthew Wilcox
  2008-10-14  2:31         ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Matthew Wilcox @ 2008-10-14  2:19 UTC (permalink / raw)
  To: David Miller; +Cc: ron.mercer, grundler, linux-driver, netdev, linux-ia64

On Mon, Oct 13, 2008 at 07:03:45PM -0700, David Miller wrote:
> From: Ron Mercer <ron.mercer@qlogic.com>
> Date: Mon, 13 Oct 2008 18:54:55 -0700
> 
> > This ASIC does support all page sizes. For 4k and 8k page size the TX control block needs an external scatter gather list.  For page sizes larger than 8k the max frags is satisfied by the original TX control block.
> 
> I'm not applying this.  I _explicitly_ said I would not apply a
> solution like this.
> 
> I waited for you guys all day for this?!?!
> 
> We need to find a way to make this a Kconfig dependency.
> 
> Build failures are absolutely unacceptable.

Um, Dave, I think you misread his patch.

All it does it make the '64k case' the 'every other size case'.  There's
no build failure with Ron's patch.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

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

* Re: [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit
  2008-10-14  2:19       ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure Matthew Wilcox
@ 2008-10-14  2:31         ` David Miller
  2008-10-14  2:53           ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure Ron Mercer
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2008-10-14  2:31 UTC (permalink / raw)
  To: matthew; +Cc: ron.mercer, grundler, linux-driver, netdev, linux-ia64

From: Matthew Wilcox <matthew@wil.cx>
Date: Mon, 13 Oct 2008 20:19:02 -0600

> On Mon, Oct 13, 2008 at 07:03:45PM -0700, David Miller wrote:
> > From: Ron Mercer <ron.mercer@qlogic.com>
> > Date: Mon, 13 Oct 2008 18:54:55 -0700
> > 
> > > This ASIC does support all page sizes. For 4k and 8k page size the TX control block needs an external scatter gather list.  For page sizes larger than 8k the max frags is satisfied by the original TX control block.
> > 
> > I'm not applying this.  I _explicitly_ said I would not apply a
> > solution like this.
> > 
> > I waited for you guys all day for this?!?!
> > 
> > We need to find a way to make this a Kconfig dependency.
> > 
> > Build failures are absolutely unacceptable.
> 
> Um, Dave, I think you misread his patch.
> 
> All it does it make the '64k case' the 'every other size case'.  There's
> no build failure with Ron's patch.

Thanks for the correction, I'll look at this again :)

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

* Re: [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure
  2008-10-14  2:31         ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit David Miller
@ 2008-10-14  2:53           ` Ron Mercer
  2008-10-14  5:56             ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Ron Mercer @ 2008-10-14  2:53 UTC (permalink / raw)
  To: David Miller; +Cc: matthew, grundler, linux-driver, netdev, linux-ia64

On Mon, Oct 13, 2008 at 07:31:53PM -0700, David Miller wrote:
> From: Matthew Wilcox <matthew@wil.cx>
> Date: Mon, 13 Oct 2008 20:19:02 -0600
> 
> > On Mon, Oct 13, 2008 at 07:03:45PM -0700, David Miller wrote:
> > > From: Ron Mercer <ron.mercer@qlogic.com>
> > > Date: Mon, 13 Oct 2008 18:54:55 -0700
> > > 
> > > > This ASIC does support all page sizes. For 4k and 8k page size the TX control block needs an external scatter gather list.  For page sizes larger than 8k the max frags is satisfied by the original TX control block.
> > > 
> > > I'm not applying this.  I _explicitly_ said I would not apply a
> > > solution like this.
> > > 
> > > I waited for you guys all day for this?!?!
> > > 
> > > We need to find a way to make this a Kconfig dependency.
> > > 
> > > Build failures are absolutely unacceptable.
> > 
> > Um, Dave, I think you misread his patch.
> > 
> > All it does it make the '64k case' the 'every other size case'.  There's
> > no build failure with Ron's patch.
> 
> Thanks for the correction, I'll look at this again :)

My explanation might not have been very good.  What I was trying to say
is that the macro in question determines the size of a scatter/gathter
list that is external to the TX descriptor.  The size is based on
MAX_SKB_FRAGS and PAGE_SIZE.  When PAGE_SIZE is larger than 8k I don't
need the external scatter/gather list because all frags will fit in the
native TX descriptor.


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

* Re: [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit
  2008-10-14  2:53           ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure Ron Mercer
@ 2008-10-14  5:56             ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2008-10-14  5:56 UTC (permalink / raw)
  To: ron.mercer; +Cc: matthew, grundler, linux-driver, netdev, linux-ia64

From: Ron Mercer <ron.mercer@qlogic.com>
Date: Mon, 13 Oct 2008 19:53:29 -0700

> My explanation might not have been very good.  What I was trying to say
> is that the macro in question determines the size of a scatter/gathter
> list that is external to the TX descriptor.  The size is based on
> MAX_SKB_FRAGS and PAGE_SIZE.  When PAGE_SIZE is larger than 8k I don't
> need the external scatter/gather list because all frags will fit in the
> native TX descriptor.

Yes, it all makes sense now, thanks Ron.

Patch applied.

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

end of thread, other threads:[~2008-10-14  5:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-13  6:06 [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit Grant Grundler
2008-10-13  6:09 ` David Miller
2008-10-14  1:54   ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure Ron Mercer
2008-10-14  2:03     ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit David Miller
2008-10-14  2:19       ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure Matthew Wilcox
2008-10-14  2:31         ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit David Miller
2008-10-14  2:53           ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit compile failure Ron Mercer
2008-10-14  5:56             ` [PATCH] 2.6.27-rc9 QGLE make unsupported page size explicit David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox