public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: hdlc tree build failure
@ 2008-07-08  8:37 Stephen Rothwell
  2008-07-08  9:28 ` Pierre Ossman
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2008-07-08  8:37 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: linux-next

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

Hi Pierre,

Today's linux-next build (powerpc allyesconfig) failed like this:

drivers/mmc/host/sdhci.c: In function 'sdhci_adma_table_pre':
drivers/mmc/host/sdhci.c:363: error: 'bad_dma_address' undeclared (first use in this function)

Caused by commit b13668f718fa98b07b4ea23417fa495ccd922eca ("sdhci:
graceful handling of bad addresses") which added references to
bad_dma_address which only exists in x86.

I have reverted that commit and 02680df80583c1d266827fe0307292450cd49384
("mmc: fix spares errors of sdhci.c") which depended on it.

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: hdlc tree build failure
  2008-07-08  8:37 Stephen Rothwell
@ 2008-07-08  9:28 ` Pierre Ossman
  2008-07-08  9:30   ` Pierre Ossman
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Ossman @ 2008-07-08  9:28 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]

On Tue, 8 Jul 2008 18:37:00 +1000
Stephen Rothwell <sfr@canb•auug.org.au> wrote:

> Hi Pierre,
> 
> Today's linux-next build (powerpc allyesconfig) failed like this:
> 
> drivers/mmc/host/sdhci.c: In function 'sdhci_adma_table_pre':
> drivers/mmc/host/sdhci.c:363: error: 'bad_dma_address' undeclared (first use in this function)
> 
> Caused by commit b13668f718fa98b07b4ea23417fa495ccd922eca ("sdhci:
> graceful handling of bad addresses") which added references to
> bad_dma_address which only exists in x86.
> 

Odd.. it seems only x86 defines that value. Looking further, it seems
x86 is the only platform that checks that the address is reachable by
the device (hence the need for an error value), all others will gladly
let the device corrupt your system memory.

I'm not sure what to do here... ifdef the entire thing with ARCH_X86?
Or just remove the error checking and let things break creatively on
x86 as it would on other systems?

Rgds
-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: hdlc tree build failure
  2008-07-08  9:28 ` Pierre Ossman
@ 2008-07-08  9:30   ` Pierre Ossman
  0 siblings, 0 replies; 6+ messages in thread
From: Pierre Ossman @ 2008-07-08  9:30 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: Stephen Rothwell, linux-next

[-- Attachment #1: Type: text/plain, Size: 678 bytes --]

On Tue, 8 Jul 2008 11:28:00 +0200
Pierre Ossman <drzeus@drzeus•cx> wrote:

> 
> I'm not sure what to do here... ifdef the entire thing with ARCH_X86?
> Or just remove the error checking and let things break creatively on
> x86 as it would on other systems?
> 

Calling dma_mapping_error() seems to be the correct approach instead
of directly checking the return value. That should at least compile for
all systems. I'll update my tree.

Rgds
-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* linux-next: hdlc tree build failure
@ 2008-08-14  5:37 Stephen Rothwell
  2008-08-14 18:45 ` Krzysztof Halasa
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2008-08-14  5:37 UTC (permalink / raw)
  To: Krzysztof Halasa; +Cc: linux-next

Hi Krzysztof,

Today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/net/wan/hdlc_ppp.c: In function 'ppp_cp_parse_cr':
drivers/net/wan/hdlc_ppp.c:384: error: 'struct hdlc_device' has no member named 'stats'
drivers/net/wan/hdlc_ppp.c:390: error: 'struct hdlc_device' has no member named 'stats'
drivers/net/wan/hdlc_ppp.c: In function 'ppp_rx':
drivers/net/wan/hdlc_ppp.c:552: error: 'struct hdlc_device' has no member named 'stats'

Caused by commit 198191c4a7ce4daba379608fb38b9bc5a4eedc61 ("WAN: convert
drivers to use built-in netdev_stats") from Linus' tree interacting with
commit 2c7275708f373ac387352f13e509fd0c7679e12c ("WAN: new synchronous
PPP implementation for generic HDLC").

I have to wonder if this was even build tested ...

I added the following patch.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Thu, 14 Aug 2008 15:34:53 +1000
Subject: [PATCH] hdlc_ppp: fix up for move of stats pointer

Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
 drivers/net/wan/hdlc_ppp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c
index b0a63be..72fae21 100644
--- a/drivers/net/wan/hdlc_ppp.c
+++ b/drivers/net/wan/hdlc_ppp.c
@@ -381,13 +381,13 @@ static void ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id,
 	unsigned int nak_len = 0, rej_len = 0;
 
 	if (!(out = kmalloc(len, GFP_ATOMIC))) {
-		dev_to_hdlc(dev)->stats.rx_dropped++;
+		dev->stats.rx_dropped++;
 		return;	/* out of memory, ignore CR packet */
 	}
 
 	for (opt = data; len; len -= opt[1], opt += opt[1]) {
 		if (len < 2 || len < opt[1]) {
-			dev_to_hdlc(dev)->stats.rx_errors++;
+			dev->stats.rx_errors++;
 			return; /* bad packet, drop silently */
 		}
 
@@ -549,7 +549,7 @@ static int ppp_rx(struct sk_buff *skb)
 	goto out;
 
 rx_error:
-	dev_to_hdlc(dev)->stats.rx_errors++;
+	dev->stats.rx_errors++;
 out:
 	spin_unlock_irqrestore(&ppp->lock, flags);
 	dev_kfree_skb_any(skb);
-- 
1.5.6.3

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

* Re: linux-next: hdlc tree build failure
  2008-08-14  5:37 linux-next: hdlc tree build failure Stephen Rothwell
@ 2008-08-14 18:45 ` Krzysztof Halasa
  2008-08-15  0:27   ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Halasa @ 2008-08-14 18:45 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next

Hi,

Stephen Rothwell <sfr@canb•auug.org.au> writes:

> Today's linux-next build (x86_64 allmodconfig) failed like this:
>
> drivers/net/wan/hdlc_ppp.c: In function 'ppp_cp_parse_cr':
> drivers/net/wan/hdlc_ppp.c:384: error: 'struct hdlc_device' has no
> member named 'stats'

Oops, sorry about that, my fault, already fixed it.

> I have to wonder if this was even build tested ...

It was, without the dev->stats patch which I made later. Then
I rebased, and even saw the problem while doing so :-(
-- 
Krzysztof Halasa

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

* Re: linux-next: hdlc tree build failure
  2008-08-14 18:45 ` Krzysztof Halasa
@ 2008-08-15  0:27   ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2008-08-15  0:27 UTC (permalink / raw)
  To: Krzysztof Halasa; +Cc: linux-next

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

On Thu, 14 Aug 2008 20:45:34 +0200 Krzysztof Halasa <khc@pm•waw.pl> wrote:
>
> Stephen Rothwell <sfr@canb•auug.org.au> writes:
> 
> > Today's linux-next build (x86_64 allmodconfig) failed like this:
> >
> > drivers/net/wan/hdlc_ppp.c: In function 'ppp_cp_parse_cr':
> > drivers/net/wan/hdlc_ppp.c:384: error: 'struct hdlc_device' has no
> > member named 'stats'
> 
> Oops, sorry about that, my fault, already fixed it.

Ok, thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2008-08-15  0:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-14  5:37 linux-next: hdlc tree build failure Stephen Rothwell
2008-08-14 18:45 ` Krzysztof Halasa
2008-08-15  0:27   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2008-07-08  8:37 Stephen Rothwell
2008-07-08  9:28 ` Pierre Ossman
2008-07-08  9:30   ` Pierre Ossman

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