All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the final tree (net tree related)
@ 2012-01-09  5:38 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2012-01-09  5:38 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Glauber Costa

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

Hi ,

After merging the final tree, today's linux-next build (powerpc
allnoconfig) failed like this:

In file included from include/linux/tcp.h:211:0,
                 from include/linux/ipv6.h:221,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:26,
                 from include/linux/nfs_fs.h:50,
                 from init/do_mounts.c:20:
include/net/sock.h: In function 'sk_update_clone':
include/net/sock.h:1109:3: error: implicit declaration of function 'sock_update_memcg' [-Werror=implicit-function-declaration]

Caused by commit f3f511e1ce6f ("net: fix sock_clone reference mismatch
with tcp memcontrol") from the net tree.  In this build, CONFIG_INET is not set.

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 9 Jan 2012 16:33:16 +1100
Subject: [PATCH] net: sk_update_clone is only used in net/core/sock.c

so move it there.  Fixes build errors when CONFIG_INET is not defeined:

In file included from include/linux/tcp.h:211:0,
                 from include/linux/ipv6.h:221,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:26,
                 from include/linux/nfs_fs.h:50,
                 from init/do_mounts.c:20:
include/net/sock.h: In function 'sk_update_clone':
include/net/sock.h:1109:3: error: implicit declaration of function 'sock_update_memcg' [-Werror=implicit-function-declaration]

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/net/sock.h |    6 ------
 net/core/sock.c    |    6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 0ed65e3..bb972d2 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1103,12 +1103,6 @@ sk_sockets_allocated_read_positive(struct sock *sk)
 	return percpu_counter_sum_positive(prot->sockets_allocated);
 }
 
-static inline void sk_update_clone(const struct sock *sk, struct sock *newsk)
-{
-	if (mem_cgroup_sockets_enabled && sk->sk_cgrp)
-		sock_update_memcg(newsk);
-}
-
 static inline int
 proto_sockets_allocated_sum_positive(struct proto *prot)
 {
diff --git a/net/core/sock.c b/net/core/sock.c
index e80b64f..c3ae73d 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1272,6 +1272,12 @@ void sk_release_kernel(struct sock *sk)
 }
 EXPORT_SYMBOL(sk_release_kernel);
 
+static void sk_update_clone(const struct sock *sk, struct sock *newsk)
+{
+	if (mem_cgroup_sockets_enabled && sk->sk_cgrp)
+		sock_update_memcg(newsk);
+}
+
 /**
  *	sk_clone_lock - clone a socket, and lock its clone
  *	@sk: the socket to clone
-- 
1.7.8.197.g73c6b

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

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2012-01-09  5:38 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2012-01-09  5:38 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Glauber Costa

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

Hi ,

After merging the final tree, today's linux-next build (powerpc
allnoconfig) failed like this:

In file included from include/linux/tcp.h:211:0,
                 from include/linux/ipv6.h:221,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:26,
                 from include/linux/nfs_fs.h:50,
                 from init/do_mounts.c:20:
include/net/sock.h: In function 'sk_update_clone':
include/net/sock.h:1109:3: error: implicit declaration of function 'sock_update_memcg' [-Werror=implicit-function-declaration]

Caused by commit f3f511e1ce6f ("net: fix sock_clone reference mismatch
with tcp memcontrol") from the net tree.  In this build, CONFIG_INET is not set.

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 9 Jan 2012 16:33:16 +1100
Subject: [PATCH] net: sk_update_clone is only used in net/core/sock.c

so move it there.  Fixes build errors when CONFIG_INET is not defeined:

In file included from include/linux/tcp.h:211:0,
                 from include/linux/ipv6.h:221,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:26,
                 from include/linux/nfs_fs.h:50,
                 from init/do_mounts.c:20:
include/net/sock.h: In function 'sk_update_clone':
include/net/sock.h:1109:3: error: implicit declaration of function 'sock_update_memcg' [-Werror=implicit-function-declaration]

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/net/sock.h |    6 ------
 net/core/sock.c    |    6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 0ed65e3..bb972d2 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1103,12 +1103,6 @@ sk_sockets_allocated_read_positive(struct sock *sk)
 	return percpu_counter_sum_positive(prot->sockets_allocated);
 }
 
-static inline void sk_update_clone(const struct sock *sk, struct sock *newsk)
-{
-	if (mem_cgroup_sockets_enabled && sk->sk_cgrp)
-		sock_update_memcg(newsk);
-}
-
 static inline int
 proto_sockets_allocated_sum_positive(struct proto *prot)
 {
diff --git a/net/core/sock.c b/net/core/sock.c
index e80b64f..c3ae73d 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1272,6 +1272,12 @@ void sk_release_kernel(struct sock *sk)
 }
 EXPORT_SYMBOL(sk_release_kernel);
 
+static void sk_update_clone(const struct sock *sk, struct sock *newsk)
+{
+	if (mem_cgroup_sockets_enabled && sk->sk_cgrp)
+		sock_update_memcg(newsk);
+}
+
 /**
  *	sk_clone_lock - clone a socket, and lock its clone
  *	@sk: the socket to clone
-- 
1.7.8.197.g73c6b

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2012-01-09  5:38 ` Stephen Rothwell
  (?)
@ 2012-01-09  6:52 ` David Miller
  2012-01-16  7:36     ` Glauber Costa
  -1 siblings, 1 reply; 105+ messages in thread
From: David Miller @ 2012-01-09  6:52 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, glommer

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 9 Jan 2012 16:38:12 +1100

> I applied the following patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 9 Jan 2012 16:33:16 +1100
> Subject: [PATCH] net: sk_update_clone is only used in net/core/sock.c
> 
> so move it there.  Fixes build errors when CONFIG_INET is not defeined:
> 
> In file included from include/linux/tcp.h:211:0,
>                  from include/linux/ipv6.h:221,
>                  from include/net/ipv6.h:16,
>                  from include/linux/sunrpc/clnt.h:26,
>                  from include/linux/nfs_fs.h:50,
>                  from init/do_mounts.c:20:
> include/net/sock.h: In function 'sk_update_clone':
> include/net/sock.h:1109:3: error: implicit declaration of function 'sock_update_memcg' [-Werror=implicit-function-declaration]
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied, thanks Stephen.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2012-01-09  6:52 ` David Miller
@ 2012-01-16  7:36     ` Glauber Costa
  0 siblings, 0 replies; 105+ messages in thread
From: Glauber Costa @ 2012-01-16  7:36 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, netdev, linux-next, linux-kernel

On 01/09/2012 10:52 AM, David Miller wrote:
> From: Stephen Rothwell<sfr@canb.auug.org.au>
> Date: Mon, 9 Jan 2012 16:38:12 +1100
>
>> I applied the following patch for today:
>>
>> From: Stephen Rothwell<sfr@canb.auug.org.au>
>> Date: Mon, 9 Jan 2012 16:33:16 +1100
>> Subject: [PATCH] net: sk_update_clone is only used in net/core/sock.c
>>
>> so move it there.  Fixes build errors when CONFIG_INET is not defeined:
>>
>> In file included from include/linux/tcp.h:211:0,
>>                   from include/linux/ipv6.h:221,
>>                   from include/net/ipv6.h:16,
>>                   from include/linux/sunrpc/clnt.h:26,
>>                   from include/linux/nfs_fs.h:50,
>>                   from init/do_mounts.c:20:
>> include/net/sock.h: In function 'sk_update_clone':
>> include/net/sock.h:1109:3: error: implicit declaration of function 'sock_update_memcg' [-Werror=implicit-function-declaration]
>>
>> Signed-off-by: Stephen Rothwell<sfr@canb.auug.org.au>
>
> Applied, thanks Stephen.
This is not the proper fix.
Although it can stay for a matter of style if you guys prefer the inline 
function definition to live in sock.c since no one else uses it.
I'll send a patch to fix this, that can live ontop of yours, shortly.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
@ 2012-01-16  7:36     ` Glauber Costa
  0 siblings, 0 replies; 105+ messages in thread
From: Glauber Costa @ 2012-01-16  7:36 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, netdev, linux-next, linux-kernel

On 01/09/2012 10:52 AM, David Miller wrote:
> From: Stephen Rothwell<sfr@canb.auug.org.au>
> Date: Mon, 9 Jan 2012 16:38:12 +1100
>
>> I applied the following patch for today:
>>
>> From: Stephen Rothwell<sfr@canb.auug.org.au>
>> Date: Mon, 9 Jan 2012 16:33:16 +1100
>> Subject: [PATCH] net: sk_update_clone is only used in net/core/sock.c
>>
>> so move it there.  Fixes build errors when CONFIG_INET is not defeined:
>>
>> In file included from include/linux/tcp.h:211:0,
>>                   from include/linux/ipv6.h:221,
>>                   from include/net/ipv6.h:16,
>>                   from include/linux/sunrpc/clnt.h:26,
>>                   from include/linux/nfs_fs.h:50,
>>                   from init/do_mounts.c:20:
>> include/net/sock.h: In function 'sk_update_clone':
>> include/net/sock.h:1109:3: error: implicit declaration of function 'sock_update_memcg' [-Werror=implicit-function-declaration]
>>
>> Signed-off-by: Stephen Rothwell<sfr@canb.auug.org.au>
>
> Applied, thanks Stephen.
This is not the proper fix.
Although it can stay for a matter of style if you guys prefer the inline 
function definition to live in sock.c since no one else uses it.
I'll send a patch to fix this, that can live ontop of yours, shortly.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-12-22  6:07 ` Stephen Rothwell
  (?)
  (?)
@ 2011-12-22  7:01 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2011-12-22  7:01 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, torvalds, eric.dumazet

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 22 Dec 2011 17:07:26 +1100

> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
> 
> net/ipv4/route.c: In function 'rt_check_expire':
> net/ipv4/route.c:873:4: error: implicit declaration of function 'prefetch' [-Werror=implicit-function-declaration]
> 
> Caused by commit 9f28a2fc0bd7 ("ipv4: reintroduce route cache garbage
> collector").
> 
> Linus, that commit is in the latest pull request you have from Dave ...

Sorry, that was just reinstating code that got removed but we forgot
the prefetch.h header.  Both Eric and I test built this as well as did
run time testing on the fix.

Linus, could you just apply this obvious fix directly?  Sorry for the
trouble.

Thanks.

> I applied the following patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 22 Dec 2011 17:03:29 +1100
> Subject: [PATCH] ipv4: using prefetch requires including prefetch.h
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  net/ipv4/route.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 7460483..9c01f56 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -91,6 +91,7 @@
>  #include <linux/rcupdate.h>
>  #include <linux/times.h>
>  #include <linux/slab.h>
> +#include <linux/prefetch.h>
>  #include <net/dst.h>
>  #include <net/net_namespace.h>
>  #include <net/protocol.h>
> -- 
> 1.7.8.197.g73c6b
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-12-22  6:07 ` Stephen Rothwell
  (?)
@ 2011-12-22  6:16 ` Eric Dumazet
  -1 siblings, 0 replies; 105+ messages in thread
From: Eric Dumazet @ 2011-12-22  6:16 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: David Miller, netdev, linux-next, linux-kernel, Linus

Le jeudi 22 décembre 2011 à 17:07 +1100, Stephen Rothwell a écrit :
> Hi all,
> 
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
> 
> net/ipv4/route.c: In function 'rt_check_expire':
> net/ipv4/route.c:873:4: error: implicit declaration of function 'prefetch' [-Werror=implicit-function-declaration]
> 
> Caused by commit 9f28a2fc0bd7 ("ipv4: reintroduce route cache garbage
> collector").
> 
> Linus, that commit is in the latest pull request you have from Dave ...
> 
> I applied the following patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 22 Dec 2011 17:03:29 +1100
> Subject: [PATCH] ipv4: using prefetch requires including prefetch.h
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  net/ipv4/route.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 7460483..9c01f56 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -91,6 +91,7 @@
>  #include <linux/rcupdate.h>
>  #include <linux/times.h>
>  #include <linux/slab.h>
> +#include <linux/prefetch.h>
>  #include <net/dst.h>
>  #include <net/net_namespace.h>
>  #include <net/protocol.h>
> -- 
> 1.7.8.197.g73c6b
> 

Thanks Stephen

I did a revert of a previous patch, and at that time prefetch() was
probably included in some header.

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>



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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-12-22  6:07 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-12-22  6:07 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Linus, Eric Dumazet

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

Hi all,

After merging the final tree, today's linux-next build (sparc32 defconfig)
failed like this:

net/ipv4/route.c: In function 'rt_check_expire':
net/ipv4/route.c:873:4: error: implicit declaration of function 'prefetch' [-Werror=implicit-function-declaration]

Caused by commit 9f28a2fc0bd7 ("ipv4: reintroduce route cache garbage
collector").

Linus, that commit is in the latest pull request you have from Dave ...

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 22 Dec 2011 17:03:29 +1100
Subject: [PATCH] ipv4: using prefetch requires including prefetch.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/ipv4/route.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 7460483..9c01f56 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -91,6 +91,7 @@
 #include <linux/rcupdate.h>
 #include <linux/times.h>
 #include <linux/slab.h>
+#include <linux/prefetch.h>
 #include <net/dst.h>
 #include <net/net_namespace.h>
 #include <net/protocol.h>
-- 
1.7.8.197.g73c6b

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

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-12-22  6:07 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-12-22  6:07 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Linus, Eric Dumazet

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

Hi all,

After merging the final tree, today's linux-next build (sparc32 defconfig)
failed like this:

net/ipv4/route.c: In function 'rt_check_expire':
net/ipv4/route.c:873:4: error: implicit declaration of function 'prefetch' [-Werror=implicit-function-declaration]

Caused by commit 9f28a2fc0bd7 ("ipv4: reintroduce route cache garbage
collector").

Linus, that commit is in the latest pull request you have from Dave ...

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 22 Dec 2011 17:03:29 +1100
Subject: [PATCH] ipv4: using prefetch requires including prefetch.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/ipv4/route.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 7460483..9c01f56 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -91,6 +91,7 @@
 #include <linux/rcupdate.h>
 #include <linux/times.h>
 #include <linux/slab.h>
+#include <linux/prefetch.h>
 #include <net/dst.h>
 #include <net/net_namespace.h>
 #include <net/protocol.h>
-- 
1.7.8.197.g73c6b

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-11-02  5:37 ` Stephen Rothwell
  (?)
@ 2011-11-02  5:50 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2011-11-02  5:50 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, eric.dumazet

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 2 Nov 2011 16:37:08 +1100

> Subject: [PATCH] net: fix typo in drivers/net/ethernet/xilinx/ll_temac_main.c
> 
> Commit 9e903e085262 ("net: add skb frag size accessors") used frag_size
> instead of skb_frag_size in this file.
> 
> Fixes this build error:
> 
> drivers/net/ethernet/xilinx/ll_temac_main.c: In function 'temac_start_xmit':
> drivers/net/ethernet/xilinx/ll_temac_main.c:717:3: error: implicit declaration of function 'frag_size' [-Werror=implicit-function-declaration]
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied, thanks!

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-11-02  5:37 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-11-02  5:37 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Eric Dumazet

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

Hi all,

[I thought I had reported this, but it was a similar problem in another
driver.]

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/ethernet/xilinx/ll_temac_main.c: In function 'temac_start_xmit':
drivers/net/ethernet/xilinx/ll_temac_main.c:717:3: error: implicit declaration of function 'frag_size' [-Werror=implicit-function-declaration]

Caused by commit 9e903e085262 ("net: add skb frag size accessors").

I have added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 2 Nov 2011 16:31:37 +1100
Subject: [PATCH] net: fix typo in drivers/net/ethernet/xilinx/ll_temac_main.c

Commit 9e903e085262 ("net: add skb frag size accessors") used frag_size
instead of skb_frag_size in this file.

Fixes this build error:

drivers/net/ethernet/xilinx/ll_temac_main.c: In function 'temac_start_xmit':
drivers/net/ethernet/xilinx/ll_temac_main.c:717:3: error: implicit declaration of function 'frag_size' [-Werror=implicit-function-declaration]

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ethernet/xilinx/ll_temac_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 4d1658e..caf3659 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -716,8 +716,8 @@ static int temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 		cur_p = &lp->tx_bd_v[lp->tx_bd_tail];
 		cur_p->phys = dma_map_single(ndev->dev.parent,
 					     skb_frag_address(frag),
-					     frag_size(frag), DMA_TO_DEVICE);
-		cur_p->len = frag_size(frag);
+					     skb_frag_size(frag), DMA_TO_DEVICE);
+		cur_p->len = skb_frag_size(frag);
 		cur_p->app0 = 0;
 		frag++;
 	}
-- 
1.7.7

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

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-11-02  5:37 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-11-02  5:37 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Eric Dumazet

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

Hi all,

[I thought I had reported this, but it was a similar problem in another
driver.]

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/ethernet/xilinx/ll_temac_main.c: In function 'temac_start_xmit':
drivers/net/ethernet/xilinx/ll_temac_main.c:717:3: error: implicit declaration of function 'frag_size' [-Werror=implicit-function-declaration]

Caused by commit 9e903e085262 ("net: add skb frag size accessors").

I have added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 2 Nov 2011 16:31:37 +1100
Subject: [PATCH] net: fix typo in drivers/net/ethernet/xilinx/ll_temac_main.c

Commit 9e903e085262 ("net: add skb frag size accessors") used frag_size
instead of skb_frag_size in this file.

Fixes this build error:

drivers/net/ethernet/xilinx/ll_temac_main.c: In function 'temac_start_xmit':
drivers/net/ethernet/xilinx/ll_temac_main.c:717:3: error: implicit declaration of function 'frag_size' [-Werror=implicit-function-declaration]

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ethernet/xilinx/ll_temac_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 4d1658e..caf3659 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -716,8 +716,8 @@ static int temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 		cur_p = &lp->tx_bd_v[lp->tx_bd_tail];
 		cur_p->phys = dma_map_single(ndev->dev.parent,
 					     skb_frag_address(frag),
-					     frag_size(frag), DMA_TO_DEVICE);
-		cur_p->len = frag_size(frag);
+					     skb_frag_size(frag), DMA_TO_DEVICE);
+		cur_p->len = skb_frag_size(frag);
 		cur_p->app0 = 0;
 		frag++;
 	}
-- 
1.7.7

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-08-16  6:57       ` Stephen Rothwell
@ 2011-08-16  7:17         ` David Miller
  0 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2011-08-16  7:17 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, jeffrey.t.kirsher

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 16 Aug 2011 16:57:44 +1000

> Hi Dave,
> 
> On Mon, 15 Aug 2011 23:11:16 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>>
>> Please test this patch:
>> 
>> --------------------
>> net: Fix sungem_phy sharing.
> 
> This fixes my allyesconfig build (and doesn't break any of the others :-)).
> 
> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>

Thanks a lot for testing.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-08-16  6:11     ` David Miller
@ 2011-08-16  6:57       ` Stephen Rothwell
  2011-08-16  7:17         ` David Miller
  0 siblings, 1 reply; 105+ messages in thread
From: Stephen Rothwell @ 2011-08-16  6:57 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-next, linux-kernel, jeffrey.t.kirsher

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

Hi Dave,

On Mon, 15 Aug 2011 23:11:16 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> Please test this patch:
> 
> --------------------
> net: Fix sungem_phy sharing.

This fixes my allyesconfig build (and doesn't break any of the others :-)).

Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-08-16  5:28   ` Stephen Rothwell
@ 2011-08-16  6:11     ` David Miller
  2011-08-16  6:57       ` Stephen Rothwell
  0 siblings, 1 reply; 105+ messages in thread
From: David Miller @ 2011-08-16  6:11 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, jeffrey.t.kirsher

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 16 Aug 2011 15:28:15 +1000

> Hi Dave,
> 
> On Sun, 14 Aug 2011 22:56:10 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>>
>> This should fix the include problem, but I suspect this thing won't
>> link.
> 
> Yep, indeed, today I get:
> 
> make[5]: *** No rule to make target `drivers/net/ethernet/toshiba/ethernet/sun/sungem_phy.o', needed by `drivers/net/ethernet/toshiba/built-in.o'.

Please test this patch:

--------------------
net: Fix sungem_phy sharing.

Since sungem_phy is used by multiple, unrelated, drivers make it
build as a real module under drivers/net.

depmod will pick up the symbol dependency and make sure sungem_phy.ko
gets loaded any time sungem.ko or spider_net.ko is loaded.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/Kconfig                       |    3 +
 drivers/net/Makefile                      |    2 +
 drivers/net/ethernet/sun/Makefile         |    1 -
 drivers/net/ethernet/sun/sungem.c         |    2 +-
 drivers/net/ethernet/sun/sungem_phy.c     | 1200 -----------------------------
 drivers/net/ethernet/toshiba/Makefile     |    2 +-
 drivers/net/ethernet/toshiba/spider_net.c |    4 +-
 drivers/net/sungem_phy.c                  | 1199 ++++++++++++++++++++++++++++
 include/linux/sungem_phy.h                |    2 +-
 9 files changed, 1209 insertions(+), 1206 deletions(-)
 delete mode 100644 drivers/net/ethernet/sun/sungem_phy.c
 create mode 100644 drivers/net/sungem_phy.c

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 31d8792..ef6b6be 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -186,6 +186,9 @@ config MII
 
 source "drivers/net/phy/Kconfig"
 
+config SUNGEM_PHY
+	tristate
+
 #
 #	Ethernet
 #
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 9cb47bb..c33009b 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -75,3 +75,5 @@ obj-$(CONFIG_VIRTIO_NET) += virtio_net.o
 
 obj-$(CONFIG_WIMAX) += wimax/
 obj-$(CONFIG_CAIF) += caif/
+
+obj-$(CONFIG_SUNGEM_PHY) += sungem_phy.o
diff --git a/drivers/net/ethernet/sun/Makefile b/drivers/net/ethernet/sun/Makefile
index 6e25dad..1e620ff 100644
--- a/drivers/net/ethernet/sun/Makefile
+++ b/drivers/net/ethernet/sun/Makefile
@@ -6,7 +6,6 @@ obj-$(CONFIG_HAPPYMEAL) += sunhme.o
 obj-$(CONFIG_SUNQE) += sunqe.o
 obj-$(CONFIG_SUNBMAC) += sunbmac.o
 obj-$(CONFIG_SUNGEM) += sungem.o
-obj-$(CONFIG_SUNGEM_PHY) += sungem_phy.o
 obj-$(CONFIG_CASSINI) += cassini.o
 obj-$(CONFIG_SUNVNET) += sunvnet.o
 obj-$(CONFIG_NIU) += niu.o
diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c
index 0f13c5d..fb9885d 100644
--- a/drivers/net/ethernet/sun/sungem.c
+++ b/drivers/net/ethernet/sun/sungem.c
@@ -1721,7 +1721,7 @@ static void gem_init_phy(struct gem *gp)
 	if (gp->phy_type == phy_mii_mdio0 ||
 	    gp->phy_type == phy_mii_mdio1) {
 		/* Reset and detect MII PHY */
-		mii_phy_probe(&gp->phy_mii, gp->mii_phy_addr);
+		sungem_phy_probe(&gp->phy_mii, gp->mii_phy_addr);
 
 		/* Init PHY */
 		if (gp->phy_mii.def && gp->phy_mii.def->ops->init)
diff --git a/drivers/net/ethernet/sun/sungem_phy.c b/drivers/net/ethernet/sun/sungem_phy.c
deleted file mode 100644
index db99c22..0000000
--- a/drivers/net/ethernet/sun/sungem_phy.c
+++ /dev/null
@@ -1,1200 +0,0 @@
-/*
- * PHY drivers for the sungem ethernet driver.
- *
- * This file could be shared with other drivers.
- *
- * (c) 2002-2007, Benjamin Herrenscmidt (benh@kernel.crashing.org)
- *
- * TODO:
- *  - Add support for PHYs that provide an IRQ line
- *  - Eventually moved the entire polling state machine in
- *    there (out of the eth driver), so that it can easily be
- *    skipped on PHYs that implement it in hardware.
- *  - On LXT971 & BCM5201, Apple uses some chip specific regs
- *    to read the link status. Figure out why and if it makes
- *    sense to do the same (magic aneg ?)
- *  - Apple has some additional power management code for some
- *    Broadcom PHYs that they "hide" from the OpenSource version
- *    of darwin, still need to reverse engineer that
- */
-
-
-#include <linux/module.h>
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/mii.h>
-#include <linux/ethtool.h>
-#include <linux/delay.h>
-
-#ifdef CONFIG_PPC_PMAC
-#include <asm/prom.h>
-#endif
-
-#include <linux/sungem_phy.h>
-
-/* Link modes of the BCM5400 PHY */
-static const int phy_BCM5400_link_table[8][3] = {
-	{ 0, 0, 0 },	/* No link */
-	{ 0, 0, 0 },	/* 10BT Half Duplex */
-	{ 1, 0, 0 },	/* 10BT Full Duplex */
-	{ 0, 1, 0 },	/* 100BT Half Duplex */
-	{ 0, 1, 0 },	/* 100BT Half Duplex */
-	{ 1, 1, 0 },	/* 100BT Full Duplex*/
-	{ 1, 0, 1 },	/* 1000BT */
-	{ 1, 0, 1 },	/* 1000BT */
-};
-
-static inline int __phy_read(struct mii_phy* phy, int id, int reg)
-{
-	return phy->mdio_read(phy->dev, id, reg);
-}
-
-static inline void __phy_write(struct mii_phy* phy, int id, int reg, int val)
-{
-	phy->mdio_write(phy->dev, id, reg, val);
-}
-
-static inline int phy_read(struct mii_phy* phy, int reg)
-{
-	return phy->mdio_read(phy->dev, phy->mii_id, reg);
-}
-
-static inline void phy_write(struct mii_phy* phy, int reg, int val)
-{
-	phy->mdio_write(phy->dev, phy->mii_id, reg, val);
-}
-
-static int reset_one_mii_phy(struct mii_phy* phy, int phy_id)
-{
-	u16 val;
-	int limit = 10000;
-
-	val = __phy_read(phy, phy_id, MII_BMCR);
-	val &= ~(BMCR_ISOLATE | BMCR_PDOWN);
-	val |= BMCR_RESET;
-	__phy_write(phy, phy_id, MII_BMCR, val);
-
-	udelay(100);
-
-	while (--limit) {
-		val = __phy_read(phy, phy_id, MII_BMCR);
-		if ((val & BMCR_RESET) == 0)
-			break;
-		udelay(10);
-	}
-	if ((val & BMCR_ISOLATE) && limit > 0)
-		__phy_write(phy, phy_id, MII_BMCR, val & ~BMCR_ISOLATE);
-
-	return limit <= 0;
-}
-
-static int bcm5201_init(struct mii_phy* phy)
-{
-	u16 data;
-
-	data = phy_read(phy, MII_BCM5201_MULTIPHY);
-	data &= ~MII_BCM5201_MULTIPHY_SUPERISOLATE;
-	phy_write(phy, MII_BCM5201_MULTIPHY, data);
-
-	phy_write(phy, MII_BCM5201_INTERRUPT, 0);
-
-	return 0;
-}
-
-static int bcm5201_suspend(struct mii_phy* phy)
-{
-	phy_write(phy, MII_BCM5201_INTERRUPT, 0);
-	phy_write(phy, MII_BCM5201_MULTIPHY, MII_BCM5201_MULTIPHY_SUPERISOLATE);
-
-	return 0;
-}
-
-static int bcm5221_init(struct mii_phy* phy)
-{
-	u16 data;
-
-	data = phy_read(phy, MII_BCM5221_TEST);
-	phy_write(phy, MII_BCM5221_TEST,
-		data | MII_BCM5221_TEST_ENABLE_SHADOWS);
-
-	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_STAT2);
-	phy_write(phy, MII_BCM5221_SHDOW_AUX_STAT2,
-		data | MII_BCM5221_SHDOW_AUX_STAT2_APD);
-
-	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_MODE4);
-	phy_write(phy, MII_BCM5221_SHDOW_AUX_MODE4,
-		data | MII_BCM5221_SHDOW_AUX_MODE4_CLKLOPWR);
-
-	data = phy_read(phy, MII_BCM5221_TEST);
-	phy_write(phy, MII_BCM5221_TEST,
-		data & ~MII_BCM5221_TEST_ENABLE_SHADOWS);
-
-	return 0;
-}
-
-static int bcm5221_suspend(struct mii_phy* phy)
-{
-	u16 data;
-
-	data = phy_read(phy, MII_BCM5221_TEST);
-	phy_write(phy, MII_BCM5221_TEST,
-		data | MII_BCM5221_TEST_ENABLE_SHADOWS);
-
-	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_MODE4);
-	phy_write(phy, MII_BCM5221_SHDOW_AUX_MODE4,
-		  data | MII_BCM5221_SHDOW_AUX_MODE4_IDDQMODE);
-
-	return 0;
-}
-
-static int bcm5241_init(struct mii_phy* phy)
-{
-	u16 data;
-
-	data = phy_read(phy, MII_BCM5221_TEST);
-	phy_write(phy, MII_BCM5221_TEST,
-		data | MII_BCM5221_TEST_ENABLE_SHADOWS);
-
-	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_STAT2);
-	phy_write(phy, MII_BCM5221_SHDOW_AUX_STAT2,
-		data | MII_BCM5221_SHDOW_AUX_STAT2_APD);
-
-	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_MODE4);
-	phy_write(phy, MII_BCM5221_SHDOW_AUX_MODE4,
-		data & ~MII_BCM5241_SHDOW_AUX_MODE4_STANDBYPWR);
-
-	data = phy_read(phy, MII_BCM5221_TEST);
-	phy_write(phy, MII_BCM5221_TEST,
-		data & ~MII_BCM5221_TEST_ENABLE_SHADOWS);
-
-	return 0;
-}
-
-static int bcm5241_suspend(struct mii_phy* phy)
-{
-	u16 data;
-
-	data = phy_read(phy, MII_BCM5221_TEST);
-	phy_write(phy, MII_BCM5221_TEST,
-		data | MII_BCM5221_TEST_ENABLE_SHADOWS);
-
-	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_MODE4);
-	phy_write(phy, MII_BCM5221_SHDOW_AUX_MODE4,
-		  data | MII_BCM5241_SHDOW_AUX_MODE4_STANDBYPWR);
-
-	return 0;
-}
-
-static int bcm5400_init(struct mii_phy* phy)
-{
-	u16 data;
-
-	/* Configure for gigabit full duplex */
-	data = phy_read(phy, MII_BCM5400_AUXCONTROL);
-	data |= MII_BCM5400_AUXCONTROL_PWR10BASET;
-	phy_write(phy, MII_BCM5400_AUXCONTROL, data);
-
-	data = phy_read(phy, MII_BCM5400_GB_CONTROL);
-	data |= MII_BCM5400_GB_CONTROL_FULLDUPLEXCAP;
-	phy_write(phy, MII_BCM5400_GB_CONTROL, data);
-
-	udelay(100);
-
-	/* Reset and configure cascaded 10/100 PHY */
-	(void)reset_one_mii_phy(phy, 0x1f);
-
-	data = __phy_read(phy, 0x1f, MII_BCM5201_MULTIPHY);
-	data |= MII_BCM5201_MULTIPHY_SERIALMODE;
-	__phy_write(phy, 0x1f, MII_BCM5201_MULTIPHY, data);
-
-	data = phy_read(phy, MII_BCM5400_AUXCONTROL);
-	data &= ~MII_BCM5400_AUXCONTROL_PWR10BASET;
-	phy_write(phy, MII_BCM5400_AUXCONTROL, data);
-
-	return 0;
-}
-
-static int bcm5400_suspend(struct mii_phy* phy)
-{
-#if 0 /* Commented out in Darwin... someone has those dawn docs ? */
-	phy_write(phy, MII_BMCR, BMCR_PDOWN);
-#endif
-	return 0;
-}
-
-static int bcm5401_init(struct mii_phy* phy)
-{
-	u16 data;
-	int rev;
-
-	rev = phy_read(phy, MII_PHYSID2) & 0x000f;
-	if (rev == 0 || rev == 3) {
-		/* Some revisions of 5401 appear to need this
-		 * initialisation sequence to disable, according
-		 * to OF, "tap power management"
-		 *
-		 * WARNING ! OF and Darwin don't agree on the
-		 * register addresses. OF seem to interpret the
-		 * register numbers below as decimal
-		 *
-		 * Note: This should (and does) match tg3_init_5401phy_dsp
-		 *       in the tg3.c driver. -DaveM
-		 */
-		phy_write(phy, 0x18, 0x0c20);
-		phy_write(phy, 0x17, 0x0012);
-		phy_write(phy, 0x15, 0x1804);
-		phy_write(phy, 0x17, 0x0013);
-		phy_write(phy, 0x15, 0x1204);
-		phy_write(phy, 0x17, 0x8006);
-		phy_write(phy, 0x15, 0x0132);
-		phy_write(phy, 0x17, 0x8006);
-		phy_write(phy, 0x15, 0x0232);
-		phy_write(phy, 0x17, 0x201f);
-		phy_write(phy, 0x15, 0x0a20);
-	}
-
-	/* Configure for gigabit full duplex */
-	data = phy_read(phy, MII_BCM5400_GB_CONTROL);
-	data |= MII_BCM5400_GB_CONTROL_FULLDUPLEXCAP;
-	phy_write(phy, MII_BCM5400_GB_CONTROL, data);
-
-	udelay(10);
-
-	/* Reset and configure cascaded 10/100 PHY */
-	(void)reset_one_mii_phy(phy, 0x1f);
-
-	data = __phy_read(phy, 0x1f, MII_BCM5201_MULTIPHY);
-	data |= MII_BCM5201_MULTIPHY_SERIALMODE;
-	__phy_write(phy, 0x1f, MII_BCM5201_MULTIPHY, data);
-
-	return 0;
-}
-
-static int bcm5401_suspend(struct mii_phy* phy)
-{
-#if 0 /* Commented out in Darwin... someone has those dawn docs ? */
-	phy_write(phy, MII_BMCR, BMCR_PDOWN);
-#endif
-	return 0;
-}
-
-static int bcm5411_init(struct mii_phy* phy)
-{
-	u16 data;
-
-	/* Here's some more Apple black magic to setup
-	 * some voltage stuffs.
-	 */
-	phy_write(phy, 0x1c, 0x8c23);
-	phy_write(phy, 0x1c, 0x8ca3);
-	phy_write(phy, 0x1c, 0x8c23);
-
-	/* Here, Apple seems to want to reset it, do
-	 * it as well
-	 */
-	phy_write(phy, MII_BMCR, BMCR_RESET);
-	phy_write(phy, MII_BMCR, 0x1340);
-
-	data = phy_read(phy, MII_BCM5400_GB_CONTROL);
-	data |= MII_BCM5400_GB_CONTROL_FULLDUPLEXCAP;
-	phy_write(phy, MII_BCM5400_GB_CONTROL, data);
-
-	udelay(10);
-
-	/* Reset and configure cascaded 10/100 PHY */
-	(void)reset_one_mii_phy(phy, 0x1f);
-
-	return 0;
-}
-
-static int genmii_setup_aneg(struct mii_phy *phy, u32 advertise)
-{
-	u16 ctl, adv;
-
-	phy->autoneg = 1;
-	phy->speed = SPEED_10;
-	phy->duplex = DUPLEX_HALF;
-	phy->pause = 0;
-	phy->advertising = advertise;
-
-	/* Setup standard advertise */
-	adv = phy_read(phy, MII_ADVERTISE);
-	adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
-	if (advertise & ADVERTISED_10baseT_Half)
-		adv |= ADVERTISE_10HALF;
-	if (advertise & ADVERTISED_10baseT_Full)
-		adv |= ADVERTISE_10FULL;
-	if (advertise & ADVERTISED_100baseT_Half)
-		adv |= ADVERTISE_100HALF;
-	if (advertise & ADVERTISED_100baseT_Full)
-		adv |= ADVERTISE_100FULL;
-	phy_write(phy, MII_ADVERTISE, adv);
-
-	/* Start/Restart aneg */
-	ctl = phy_read(phy, MII_BMCR);
-	ctl |= (BMCR_ANENABLE | BMCR_ANRESTART);
-	phy_write(phy, MII_BMCR, ctl);
-
-	return 0;
-}
-
-static int genmii_setup_forced(struct mii_phy *phy, int speed, int fd)
-{
-	u16 ctl;
-
-	phy->autoneg = 0;
-	phy->speed = speed;
-	phy->duplex = fd;
-	phy->pause = 0;
-
-	ctl = phy_read(phy, MII_BMCR);
-	ctl &= ~(BMCR_FULLDPLX|BMCR_SPEED100|BMCR_ANENABLE);
-
-	/* First reset the PHY */
-	phy_write(phy, MII_BMCR, ctl | BMCR_RESET);
-
-	/* Select speed & duplex */
-	switch(speed) {
-	case SPEED_10:
-		break;
-	case SPEED_100:
-		ctl |= BMCR_SPEED100;
-		break;
-	case SPEED_1000:
-	default:
-		return -EINVAL;
-	}
-	if (fd == DUPLEX_FULL)
-		ctl |= BMCR_FULLDPLX;
-	phy_write(phy, MII_BMCR, ctl);
-
-	return 0;
-}
-
-static int genmii_poll_link(struct mii_phy *phy)
-{
-	u16 status;
-
-	(void)phy_read(phy, MII_BMSR);
-	status = phy_read(phy, MII_BMSR);
-	if ((status & BMSR_LSTATUS) == 0)
-		return 0;
-	if (phy->autoneg && !(status & BMSR_ANEGCOMPLETE))
-		return 0;
-	return 1;
-}
-
-static int genmii_read_link(struct mii_phy *phy)
-{
-	u16 lpa;
-
-	if (phy->autoneg) {
-		lpa = phy_read(phy, MII_LPA);
-
-		if (lpa & (LPA_10FULL | LPA_100FULL))
-			phy->duplex = DUPLEX_FULL;
-		else
-			phy->duplex = DUPLEX_HALF;
-		if (lpa & (LPA_100FULL | LPA_100HALF))
-			phy->speed = SPEED_100;
-		else
-			phy->speed = SPEED_10;
-		phy->pause = 0;
-	}
-	/* On non-aneg, we assume what we put in BMCR is the speed,
-	 * though magic-aneg shouldn't prevent this case from occurring
-	 */
-
-	 return 0;
-}
-
-static int generic_suspend(struct mii_phy* phy)
-{
-	phy_write(phy, MII_BMCR, BMCR_PDOWN);
-
-	return 0;
-}
-
-static int bcm5421_init(struct mii_phy* phy)
-{
-	u16 data;
-	unsigned int id;
-
-	id = (phy_read(phy, MII_PHYSID1) << 16 | phy_read(phy, MII_PHYSID2));
-
-	/* Revision 0 of 5421 needs some fixups */
-	if (id == 0x002060e0) {
-		/* This is borrowed from MacOS
-		 */
-		phy_write(phy, 0x18, 0x1007);
-		data = phy_read(phy, 0x18);
-		phy_write(phy, 0x18, data | 0x0400);
-		phy_write(phy, 0x18, 0x0007);
-		data = phy_read(phy, 0x18);
-		phy_write(phy, 0x18, data | 0x0800);
-		phy_write(phy, 0x17, 0x000a);
-		data = phy_read(phy, 0x15);
-		phy_write(phy, 0x15, data | 0x0200);
-	}
-
-	/* Pick up some init code from OF for K2 version */
-	if ((id & 0xfffffff0) == 0x002062e0) {
-		phy_write(phy, 4, 0x01e1);
-		phy_write(phy, 9, 0x0300);
-	}
-
-	/* Check if we can enable automatic low power */
-#ifdef CONFIG_PPC_PMAC
-	if (phy->platform_data) {
-		struct device_node *np = of_get_parent(phy->platform_data);
-		int can_low_power = 1;
-		if (np == NULL || of_get_property(np, "no-autolowpower", NULL))
-			can_low_power = 0;
-		if (can_low_power) {
-			/* Enable automatic low-power */
-			phy_write(phy, 0x1c, 0x9002);
-			phy_write(phy, 0x1c, 0xa821);
-			phy_write(phy, 0x1c, 0x941d);
-		}
-	}
-#endif /* CONFIG_PPC_PMAC */
-
-	return 0;
-}
-
-static int bcm54xx_setup_aneg(struct mii_phy *phy, u32 advertise)
-{
-	u16 ctl, adv;
-
-	phy->autoneg = 1;
-	phy->speed = SPEED_10;
-	phy->duplex = DUPLEX_HALF;
-	phy->pause = 0;
-	phy->advertising = advertise;
-
-	/* Setup standard advertise */
-	adv = phy_read(phy, MII_ADVERTISE);
-	adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
-	if (advertise & ADVERTISED_10baseT_Half)
-		adv |= ADVERTISE_10HALF;
-	if (advertise & ADVERTISED_10baseT_Full)
-		adv |= ADVERTISE_10FULL;
-	if (advertise & ADVERTISED_100baseT_Half)
-		adv |= ADVERTISE_100HALF;
-	if (advertise & ADVERTISED_100baseT_Full)
-		adv |= ADVERTISE_100FULL;
-	if (advertise & ADVERTISED_Pause)
-		adv |= ADVERTISE_PAUSE_CAP;
-	if (advertise & ADVERTISED_Asym_Pause)
-		adv |= ADVERTISE_PAUSE_ASYM;
-	phy_write(phy, MII_ADVERTISE, adv);
-
-	/* Setup 1000BT advertise */
-	adv = phy_read(phy, MII_1000BASETCONTROL);
-	adv &= ~(MII_1000BASETCONTROL_FULLDUPLEXCAP|MII_1000BASETCONTROL_HALFDUPLEXCAP);
-	if (advertise & SUPPORTED_1000baseT_Half)
-		adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP;
-	if (advertise & SUPPORTED_1000baseT_Full)
-		adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP;
-	phy_write(phy, MII_1000BASETCONTROL, adv);
-
-	/* Start/Restart aneg */
-	ctl = phy_read(phy, MII_BMCR);
-	ctl |= (BMCR_ANENABLE | BMCR_ANRESTART);
-	phy_write(phy, MII_BMCR, ctl);
-
-	return 0;
-}
-
-static int bcm54xx_setup_forced(struct mii_phy *phy, int speed, int fd)
-{
-	u16 ctl;
-
-	phy->autoneg = 0;
-	phy->speed = speed;
-	phy->duplex = fd;
-	phy->pause = 0;
-
-	ctl = phy_read(phy, MII_BMCR);
-	ctl &= ~(BMCR_FULLDPLX|BMCR_SPEED100|BMCR_SPD2|BMCR_ANENABLE);
-
-	/* First reset the PHY */
-	phy_write(phy, MII_BMCR, ctl | BMCR_RESET);
-
-	/* Select speed & duplex */
-	switch(speed) {
-	case SPEED_10:
-		break;
-	case SPEED_100:
-		ctl |= BMCR_SPEED100;
-		break;
-	case SPEED_1000:
-		ctl |= BMCR_SPD2;
-	}
-	if (fd == DUPLEX_FULL)
-		ctl |= BMCR_FULLDPLX;
-
-	// XXX Should we set the sungem to GII now on 1000BT ?
-
-	phy_write(phy, MII_BMCR, ctl);
-
-	return 0;
-}
-
-static int bcm54xx_read_link(struct mii_phy *phy)
-{
-	int link_mode;
-	u16 val;
-
-	if (phy->autoneg) {
-	    	val = phy_read(phy, MII_BCM5400_AUXSTATUS);
-		link_mode = ((val & MII_BCM5400_AUXSTATUS_LINKMODE_MASK) >>
-			     MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT);
-		phy->duplex = phy_BCM5400_link_table[link_mode][0] ?
-			DUPLEX_FULL : DUPLEX_HALF;
-		phy->speed = phy_BCM5400_link_table[link_mode][2] ?
-				SPEED_1000 :
-				(phy_BCM5400_link_table[link_mode][1] ?
-				 SPEED_100 : SPEED_10);
-		val = phy_read(phy, MII_LPA);
-		phy->pause = (phy->duplex == DUPLEX_FULL) &&
-			((val & LPA_PAUSE) != 0);
-	}
-	/* On non-aneg, we assume what we put in BMCR is the speed,
-	 * though magic-aneg shouldn't prevent this case from occurring
-	 */
-
-	return 0;
-}
-
-static int marvell88e1111_init(struct mii_phy* phy)
-{
-	u16 rev;
-
-	/* magic init sequence for rev 0 */
-	rev = phy_read(phy, MII_PHYSID2) & 0x000f;
-	if (rev == 0) {
-		phy_write(phy, 0x1d, 0x000a);
-		phy_write(phy, 0x1e, 0x0821);
-
-		phy_write(phy, 0x1d, 0x0006);
-		phy_write(phy, 0x1e, 0x8600);
-
-		phy_write(phy, 0x1d, 0x000b);
-		phy_write(phy, 0x1e, 0x0100);
-
-		phy_write(phy, 0x1d, 0x0004);
-		phy_write(phy, 0x1e, 0x4850);
-	}
-	return 0;
-}
-
-#define BCM5421_MODE_MASK	(1 << 5)
-
-static int bcm5421_poll_link(struct mii_phy* phy)
-{
-	u32 phy_reg;
-	int mode;
-
-	/* find out in what mode we are */
-	phy_write(phy, MII_NCONFIG, 0x1000);
-	phy_reg = phy_read(phy, MII_NCONFIG);
-
-	mode = (phy_reg & BCM5421_MODE_MASK) >> 5;
-
-	if ( mode == BCM54XX_COPPER)
-		return genmii_poll_link(phy);
-
-	/* try to find out wether we have a link */
-	phy_write(phy, MII_NCONFIG, 0x2000);
-	phy_reg = phy_read(phy, MII_NCONFIG);
-
-	if (phy_reg & 0x0020)
-		return 0;
-	else
-		return 1;
-}
-
-static int bcm5421_read_link(struct mii_phy* phy)
-{
-	u32 phy_reg;
-	int mode;
-
-	/* find out in what mode we are */
-	phy_write(phy, MII_NCONFIG, 0x1000);
-	phy_reg = phy_read(phy, MII_NCONFIG);
-
-	mode = (phy_reg & BCM5421_MODE_MASK ) >> 5;
-
-	if ( mode == BCM54XX_COPPER)
-		return bcm54xx_read_link(phy);
-
-	phy->speed = SPEED_1000;
-
-	/* find out wether we are running half- or full duplex */
-	phy_write(phy, MII_NCONFIG, 0x2000);
-	phy_reg = phy_read(phy, MII_NCONFIG);
-
-	if ( (phy_reg & 0x0080) >> 7)
-		phy->duplex |=  DUPLEX_HALF;
-	else
-		phy->duplex |=  DUPLEX_FULL;
-
-	return 0;
-}
-
-static int bcm5421_enable_fiber(struct mii_phy* phy, int autoneg)
-{
-	/* enable fiber mode */
-	phy_write(phy, MII_NCONFIG, 0x9020);
-	/* LEDs active in both modes, autosense prio = fiber */
-	phy_write(phy, MII_NCONFIG, 0x945f);
-
-	if (!autoneg) {
-		/* switch off fibre autoneg */
-		phy_write(phy, MII_NCONFIG, 0xfc01);
-		phy_write(phy, 0x0b, 0x0004);
-	}
-
-	phy->autoneg = autoneg;
-
-	return 0;
-}
-
-#define BCM5461_FIBER_LINK	(1 << 2)
-#define BCM5461_MODE_MASK	(3 << 1)
-
-static int bcm5461_poll_link(struct mii_phy* phy)
-{
-	u32 phy_reg;
-	int mode;
-
-	/* find out in what mode we are */
-	phy_write(phy, MII_NCONFIG, 0x7c00);
-	phy_reg = phy_read(phy, MII_NCONFIG);
-
-	mode = (phy_reg & BCM5461_MODE_MASK ) >> 1;
-
-	if ( mode == BCM54XX_COPPER)
-		return genmii_poll_link(phy);
-
-	/* find out wether we have a link */
-	phy_write(phy, MII_NCONFIG, 0x7000);
-	phy_reg = phy_read(phy, MII_NCONFIG);
-
-	if (phy_reg & BCM5461_FIBER_LINK)
-		return 1;
-	else
-		return 0;
-}
-
-#define BCM5461_FIBER_DUPLEX	(1 << 3)
-
-static int bcm5461_read_link(struct mii_phy* phy)
-{
-	u32 phy_reg;
-	int mode;
-
-	/* find out in what mode we are */
-	phy_write(phy, MII_NCONFIG, 0x7c00);
-	phy_reg = phy_read(phy, MII_NCONFIG);
-
-	mode = (phy_reg & BCM5461_MODE_MASK ) >> 1;
-
-	if ( mode == BCM54XX_COPPER) {
-		return bcm54xx_read_link(phy);
-	}
-
-	phy->speed = SPEED_1000;
-
-	/* find out wether we are running half- or full duplex */
-	phy_write(phy, MII_NCONFIG, 0x7000);
-	phy_reg = phy_read(phy, MII_NCONFIG);
-
-	if (phy_reg & BCM5461_FIBER_DUPLEX)
-		phy->duplex |=  DUPLEX_FULL;
-	else
-		phy->duplex |=  DUPLEX_HALF;
-
-	return 0;
-}
-
-static int bcm5461_enable_fiber(struct mii_phy* phy, int autoneg)
-{
-	/* select fiber mode, enable 1000 base-X registers */
-	phy_write(phy, MII_NCONFIG, 0xfc0b);
-
-	if (autoneg) {
-		/* enable fiber with no autonegotiation */
-		phy_write(phy, MII_ADVERTISE, 0x01e0);
-		phy_write(phy, MII_BMCR, 0x1140);
-	} else {
-		/* enable fiber with autonegotiation */
-		phy_write(phy, MII_BMCR, 0x0140);
-	}
-
-	phy->autoneg = autoneg;
-
-	return 0;
-}
-
-static int marvell_setup_aneg(struct mii_phy *phy, u32 advertise)
-{
-	u16 ctl, adv;
-
-	phy->autoneg = 1;
-	phy->speed = SPEED_10;
-	phy->duplex = DUPLEX_HALF;
-	phy->pause = 0;
-	phy->advertising = advertise;
-
-	/* Setup standard advertise */
-	adv = phy_read(phy, MII_ADVERTISE);
-	adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
-	if (advertise & ADVERTISED_10baseT_Half)
-		adv |= ADVERTISE_10HALF;
-	if (advertise & ADVERTISED_10baseT_Full)
-		adv |= ADVERTISE_10FULL;
-	if (advertise & ADVERTISED_100baseT_Half)
-		adv |= ADVERTISE_100HALF;
-	if (advertise & ADVERTISED_100baseT_Full)
-		adv |= ADVERTISE_100FULL;
-	if (advertise & ADVERTISED_Pause)
-		adv |= ADVERTISE_PAUSE_CAP;
-	if (advertise & ADVERTISED_Asym_Pause)
-		adv |= ADVERTISE_PAUSE_ASYM;
-	phy_write(phy, MII_ADVERTISE, adv);
-
-	/* Setup 1000BT advertise & enable crossover detect
-	 * XXX How do we advertise 1000BT ? Darwin source is
-	 * confusing here, they read from specific control and
-	 * write to control... Someone has specs for those
-	 * beasts ?
-	 */
-	adv = phy_read(phy, MII_M1011_PHY_SPEC_CONTROL);
-	adv |= MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX;
-	adv &= ~(MII_1000BASETCONTROL_FULLDUPLEXCAP |
-			MII_1000BASETCONTROL_HALFDUPLEXCAP);
-	if (advertise & SUPPORTED_1000baseT_Half)
-		adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP;
-	if (advertise & SUPPORTED_1000baseT_Full)
-		adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP;
-	phy_write(phy, MII_1000BASETCONTROL, adv);
-
-	/* Start/Restart aneg */
-	ctl = phy_read(phy, MII_BMCR);
-	ctl |= (BMCR_ANENABLE | BMCR_ANRESTART);
-	phy_write(phy, MII_BMCR, ctl);
-
-	return 0;
-}
-
-static int marvell_setup_forced(struct mii_phy *phy, int speed, int fd)
-{
-	u16 ctl, ctl2;
-
-	phy->autoneg = 0;
-	phy->speed = speed;
-	phy->duplex = fd;
-	phy->pause = 0;
-
-	ctl = phy_read(phy, MII_BMCR);
-	ctl &= ~(BMCR_FULLDPLX|BMCR_SPEED100|BMCR_SPD2|BMCR_ANENABLE);
-	ctl |= BMCR_RESET;
-
-	/* Select speed & duplex */
-	switch(speed) {
-	case SPEED_10:
-		break;
-	case SPEED_100:
-		ctl |= BMCR_SPEED100;
-		break;
-	/* I'm not sure about the one below, again, Darwin source is
-	 * quite confusing and I lack chip specs
-	 */
-	case SPEED_1000:
-		ctl |= BMCR_SPD2;
-	}
-	if (fd == DUPLEX_FULL)
-		ctl |= BMCR_FULLDPLX;
-
-	/* Disable crossover. Again, the way Apple does it is strange,
-	 * though I don't assume they are wrong ;)
-	 */
-	ctl2 = phy_read(phy, MII_M1011_PHY_SPEC_CONTROL);
-	ctl2 &= ~(MII_M1011_PHY_SPEC_CONTROL_MANUAL_MDIX |
-		MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX |
-		MII_1000BASETCONTROL_FULLDUPLEXCAP |
-		MII_1000BASETCONTROL_HALFDUPLEXCAP);
-	if (speed == SPEED_1000)
-		ctl2 |= (fd == DUPLEX_FULL) ?
-			MII_1000BASETCONTROL_FULLDUPLEXCAP :
-			MII_1000BASETCONTROL_HALFDUPLEXCAP;
-	phy_write(phy, MII_1000BASETCONTROL, ctl2);
-
-	// XXX Should we set the sungem to GII now on 1000BT ?
-
-	phy_write(phy, MII_BMCR, ctl);
-
-	return 0;
-}
-
-static int marvell_read_link(struct mii_phy *phy)
-{
-	u16 status, pmask;
-
-	if (phy->autoneg) {
-		status = phy_read(phy, MII_M1011_PHY_SPEC_STATUS);
-		if ((status & MII_M1011_PHY_SPEC_STATUS_RESOLVED) == 0)
-			return -EAGAIN;
-		if (status & MII_M1011_PHY_SPEC_STATUS_1000)
-			phy->speed = SPEED_1000;
-		else if (status & MII_M1011_PHY_SPEC_STATUS_100)
-			phy->speed = SPEED_100;
-		else
-			phy->speed = SPEED_10;
-		if (status & MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX)
-			phy->duplex = DUPLEX_FULL;
-		else
-			phy->duplex = DUPLEX_HALF;
-		pmask = MII_M1011_PHY_SPEC_STATUS_TX_PAUSE |
-			MII_M1011_PHY_SPEC_STATUS_RX_PAUSE;
-		phy->pause = (status & pmask) == pmask;
-	}
-	/* On non-aneg, we assume what we put in BMCR is the speed,
-	 * though magic-aneg shouldn't prevent this case from occurring
-	 */
-
-	return 0;
-}
-
-#define MII_BASIC_FEATURES \
-	(SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |	\
-	 SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |	\
-	 SUPPORTED_Autoneg | SUPPORTED_TP | SUPPORTED_MII |	\
-	 SUPPORTED_Pause)
-
-/* On gigabit capable PHYs, we advertise Pause support but not asym pause
- * support for now as I'm not sure it's supported and Darwin doesn't do
- * it neither. --BenH.
- */
-#define MII_GBIT_FEATURES \
-	(MII_BASIC_FEATURES |	\
-	 SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full)
-
-/* Broadcom BCM 5201 */
-static struct mii_phy_ops bcm5201_phy_ops = {
-	.init		= bcm5201_init,
-	.suspend	= bcm5201_suspend,
-	.setup_aneg	= genmii_setup_aneg,
-	.setup_forced	= genmii_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= genmii_read_link,
-};
-
-static struct mii_phy_def bcm5201_phy_def = {
-	.phy_id		= 0x00406210,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "BCM5201",
-	.features	= MII_BASIC_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &bcm5201_phy_ops
-};
-
-/* Broadcom BCM 5221 */
-static struct mii_phy_ops bcm5221_phy_ops = {
-	.suspend	= bcm5221_suspend,
-	.init		= bcm5221_init,
-	.setup_aneg	= genmii_setup_aneg,
-	.setup_forced	= genmii_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= genmii_read_link,
-};
-
-static struct mii_phy_def bcm5221_phy_def = {
-	.phy_id		= 0x004061e0,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "BCM5221",
-	.features	= MII_BASIC_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &bcm5221_phy_ops
-};
-
-/* Broadcom BCM 5241 */
-static struct mii_phy_ops bcm5241_phy_ops = {
-	.suspend	= bcm5241_suspend,
-	.init		= bcm5241_init,
-	.setup_aneg	= genmii_setup_aneg,
-	.setup_forced	= genmii_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= genmii_read_link,
-};
-static struct mii_phy_def bcm5241_phy_def = {
-	.phy_id		= 0x0143bc30,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "BCM5241",
-	.features	= MII_BASIC_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &bcm5241_phy_ops
-};
-
-/* Broadcom BCM 5400 */
-static struct mii_phy_ops bcm5400_phy_ops = {
-	.init		= bcm5400_init,
-	.suspend	= bcm5400_suspend,
-	.setup_aneg	= bcm54xx_setup_aneg,
-	.setup_forced	= bcm54xx_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= bcm54xx_read_link,
-};
-
-static struct mii_phy_def bcm5400_phy_def = {
-	.phy_id		= 0x00206040,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "BCM5400",
-	.features	= MII_GBIT_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &bcm5400_phy_ops
-};
-
-/* Broadcom BCM 5401 */
-static struct mii_phy_ops bcm5401_phy_ops = {
-	.init		= bcm5401_init,
-	.suspend	= bcm5401_suspend,
-	.setup_aneg	= bcm54xx_setup_aneg,
-	.setup_forced	= bcm54xx_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= bcm54xx_read_link,
-};
-
-static struct mii_phy_def bcm5401_phy_def = {
-	.phy_id		= 0x00206050,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "BCM5401",
-	.features	= MII_GBIT_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &bcm5401_phy_ops
-};
-
-/* Broadcom BCM 5411 */
-static struct mii_phy_ops bcm5411_phy_ops = {
-	.init		= bcm5411_init,
-	.suspend	= generic_suspend,
-	.setup_aneg	= bcm54xx_setup_aneg,
-	.setup_forced	= bcm54xx_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= bcm54xx_read_link,
-};
-
-static struct mii_phy_def bcm5411_phy_def = {
-	.phy_id		= 0x00206070,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "BCM5411",
-	.features	= MII_GBIT_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &bcm5411_phy_ops
-};
-
-/* Broadcom BCM 5421 */
-static struct mii_phy_ops bcm5421_phy_ops = {
-	.init		= bcm5421_init,
-	.suspend	= generic_suspend,
-	.setup_aneg	= bcm54xx_setup_aneg,
-	.setup_forced	= bcm54xx_setup_forced,
-	.poll_link	= bcm5421_poll_link,
-	.read_link	= bcm5421_read_link,
-	.enable_fiber   = bcm5421_enable_fiber,
-};
-
-static struct mii_phy_def bcm5421_phy_def = {
-	.phy_id		= 0x002060e0,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "BCM5421",
-	.features	= MII_GBIT_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &bcm5421_phy_ops
-};
-
-/* Broadcom BCM 5421 built-in K2 */
-static struct mii_phy_ops bcm5421k2_phy_ops = {
-	.init		= bcm5421_init,
-	.suspend	= generic_suspend,
-	.setup_aneg	= bcm54xx_setup_aneg,
-	.setup_forced	= bcm54xx_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= bcm54xx_read_link,
-};
-
-static struct mii_phy_def bcm5421k2_phy_def = {
-	.phy_id		= 0x002062e0,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "BCM5421-K2",
-	.features	= MII_GBIT_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &bcm5421k2_phy_ops
-};
-
-static struct mii_phy_ops bcm5461_phy_ops = {
-	.init		= bcm5421_init,
-	.suspend	= generic_suspend,
-	.setup_aneg	= bcm54xx_setup_aneg,
-	.setup_forced	= bcm54xx_setup_forced,
-	.poll_link	= bcm5461_poll_link,
-	.read_link	= bcm5461_read_link,
-	.enable_fiber   = bcm5461_enable_fiber,
-};
-
-static struct mii_phy_def bcm5461_phy_def = {
-	.phy_id		= 0x002060c0,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "BCM5461",
-	.features	= MII_GBIT_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &bcm5461_phy_ops
-};
-
-/* Broadcom BCM 5462 built-in Vesta */
-static struct mii_phy_ops bcm5462V_phy_ops = {
-	.init		= bcm5421_init,
-	.suspend	= generic_suspend,
-	.setup_aneg	= bcm54xx_setup_aneg,
-	.setup_forced	= bcm54xx_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= bcm54xx_read_link,
-};
-
-static struct mii_phy_def bcm5462V_phy_def = {
-	.phy_id		= 0x002060d0,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "BCM5462-Vesta",
-	.features	= MII_GBIT_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &bcm5462V_phy_ops
-};
-
-/* Marvell 88E1101 amd 88E1111 */
-static struct mii_phy_ops marvell88e1101_phy_ops = {
-	.suspend	= generic_suspend,
-	.setup_aneg	= marvell_setup_aneg,
-	.setup_forced	= marvell_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= marvell_read_link
-};
-
-static struct mii_phy_ops marvell88e1111_phy_ops = {
-	.init		= marvell88e1111_init,
-	.suspend	= generic_suspend,
-	.setup_aneg	= marvell_setup_aneg,
-	.setup_forced	= marvell_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= marvell_read_link
-};
-
-/* two revs in darwin for the 88e1101 ... I could use a datasheet
- * to get the proper names...
- */
-static struct mii_phy_def marvell88e1101v1_phy_def = {
-	.phy_id		= 0x01410c20,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "Marvell 88E1101v1",
-	.features	= MII_GBIT_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &marvell88e1101_phy_ops
-};
-static struct mii_phy_def marvell88e1101v2_phy_def = {
-	.phy_id		= 0x01410c60,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "Marvell 88E1101v2",
-	.features	= MII_GBIT_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &marvell88e1101_phy_ops
-};
-static struct mii_phy_def marvell88e1111_phy_def = {
-	.phy_id		= 0x01410cc0,
-	.phy_id_mask	= 0xfffffff0,
-	.name		= "Marvell 88E1111",
-	.features	= MII_GBIT_FEATURES,
-	.magic_aneg	= 1,
-	.ops		= &marvell88e1111_phy_ops
-};
-
-/* Generic implementation for most 10/100 PHYs */
-static struct mii_phy_ops generic_phy_ops = {
-	.setup_aneg	= genmii_setup_aneg,
-	.setup_forced	= genmii_setup_forced,
-	.poll_link	= genmii_poll_link,
-	.read_link	= genmii_read_link
-};
-
-static struct mii_phy_def genmii_phy_def = {
-	.phy_id		= 0x00000000,
-	.phy_id_mask	= 0x00000000,
-	.name		= "Generic MII",
-	.features	= MII_BASIC_FEATURES,
-	.magic_aneg	= 0,
-	.ops		= &generic_phy_ops
-};
-
-static struct mii_phy_def* mii_phy_table[] = {
-	&bcm5201_phy_def,
-	&bcm5221_phy_def,
-	&bcm5241_phy_def,
-	&bcm5400_phy_def,
-	&bcm5401_phy_def,
-	&bcm5411_phy_def,
-	&bcm5421_phy_def,
-	&bcm5421k2_phy_def,
-	&bcm5461_phy_def,
-	&bcm5462V_phy_def,
-	&marvell88e1101v1_phy_def,
-	&marvell88e1101v2_phy_def,
-	&marvell88e1111_phy_def,
-	&genmii_phy_def,
-	NULL
-};
-
-int mii_phy_probe(struct mii_phy *phy, int mii_id)
-{
-	int rc;
-	u32 id;
-	struct mii_phy_def* def;
-	int i;
-
-	/* We do not reset the mii_phy structure as the driver
-	 * may re-probe the PHY regulary
-	 */
-	phy->mii_id = mii_id;
-
-	/* Take PHY out of isloate mode and reset it. */
-	rc = reset_one_mii_phy(phy, mii_id);
-	if (rc)
-		goto fail;
-
-	/* Read ID and find matching entry */
-	id = (phy_read(phy, MII_PHYSID1) << 16 | phy_read(phy, MII_PHYSID2));
-	printk(KERN_DEBUG KBUILD_MODNAME ": " "PHY ID: %x, addr: %x\n",
-	       id, mii_id);
-	for (i=0; (def = mii_phy_table[i]) != NULL; i++)
-		if ((id & def->phy_id_mask) == def->phy_id)
-			break;
-	/* Should never be NULL (we have a generic entry), but... */
-	if (def == NULL)
-		goto fail;
-
-	phy->def = def;
-
-	return 0;
-fail:
-	phy->speed = 0;
-	phy->duplex = 0;
-	phy->pause = 0;
-	phy->advertising = 0;
-	return -ENODEV;
-}
-
-EXPORT_SYMBOL(mii_phy_probe);
-MODULE_LICENSE("GPL");
-
diff --git a/drivers/net/ethernet/toshiba/Makefile b/drivers/net/ethernet/toshiba/Makefile
index 71d861f..a506900 100644
--- a/drivers/net/ethernet/toshiba/Makefile
+++ b/drivers/net/ethernet/toshiba/Makefile
@@ -6,5 +6,5 @@ obj-$(CONFIG_GELIC_NET) += ps3_gelic.o
 gelic_wireless-$(CONFIG_GELIC_WIRELESS) += ps3_gelic_wireless.o
 ps3_gelic-objs += ps3_gelic_net.o $(gelic_wireless-y)
 spidernet-y += spider_net.o spider_net_ethtool.o
-obj-$(CONFIG_SPIDER_NET) += spidernet.o ethernet/sun/sungem_phy.o
+obj-$(CONFIG_SPIDER_NET) += spidernet.o
 obj-$(CONFIG_TC35815) += tc35815.o
diff --git a/drivers/net/ethernet/toshiba/spider_net.c b/drivers/net/ethernet/toshiba/spider_net.c
index 1ff3491c..af345db 100644
--- a/drivers/net/ethernet/toshiba/spider_net.c
+++ b/drivers/net/ethernet/toshiba/spider_net.c
@@ -196,7 +196,7 @@ spider_net_setup_aneg(struct spider_net_card *card)
 	if ((bmsr & BMSR_ESTATEN) && (estat & ESTATUS_1000_THALF))
 		advertise |= SUPPORTED_1000baseT_Half;
 
-	mii_phy_probe(phy, phy->mii_id);
+	sungem_phy_probe(phy, phy->mii_id);
 	phy->def->ops->setup_aneg(phy, advertise);
 
 }
@@ -2120,7 +2120,7 @@ spider_net_setup_phy(struct spider_net_card *card)
 		unsigned short id;
 		id = spider_net_read_phy(card->netdev, phy->mii_id, MII_BMSR);
 		if (id != 0x0000 && id != 0xffff) {
-			if (!mii_phy_probe(phy, phy->mii_id)) {
+			if (!sungem_phy_probe(phy, phy->mii_id)) {
 				pr_info("Found %s.\n", phy->def->name);
 				break;
 			}
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c
new file mode 100644
index 0000000..58f13ad
--- /dev/null
+++ b/drivers/net/sungem_phy.c
@@ -0,0 +1,1199 @@
+/*
+ * PHY drivers for the sungem ethernet driver.
+ *
+ * This file could be shared with other drivers.
+ *
+ * (c) 2002-2007, Benjamin Herrenscmidt (benh@kernel.crashing.org)
+ *
+ * TODO:
+ *  - Add support for PHYs that provide an IRQ line
+ *  - Eventually moved the entire polling state machine in
+ *    there (out of the eth driver), so that it can easily be
+ *    skipped on PHYs that implement it in hardware.
+ *  - On LXT971 & BCM5201, Apple uses some chip specific regs
+ *    to read the link status. Figure out why and if it makes
+ *    sense to do the same (magic aneg ?)
+ *  - Apple has some additional power management code for some
+ *    Broadcom PHYs that they "hide" from the OpenSource version
+ *    of darwin, still need to reverse engineer that
+ */
+
+
+#include <linux/module.h>
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/mii.h>
+#include <linux/ethtool.h>
+#include <linux/delay.h>
+
+#ifdef CONFIG_PPC_PMAC
+#include <asm/prom.h>
+#endif
+
+#include <linux/sungem_phy.h>
+
+/* Link modes of the BCM5400 PHY */
+static const int phy_BCM5400_link_table[8][3] = {
+	{ 0, 0, 0 },	/* No link */
+	{ 0, 0, 0 },	/* 10BT Half Duplex */
+	{ 1, 0, 0 },	/* 10BT Full Duplex */
+	{ 0, 1, 0 },	/* 100BT Half Duplex */
+	{ 0, 1, 0 },	/* 100BT Half Duplex */
+	{ 1, 1, 0 },	/* 100BT Full Duplex*/
+	{ 1, 0, 1 },	/* 1000BT */
+	{ 1, 0, 1 },	/* 1000BT */
+};
+
+static inline int __phy_read(struct mii_phy* phy, int id, int reg)
+{
+	return phy->mdio_read(phy->dev, id, reg);
+}
+
+static inline void __phy_write(struct mii_phy* phy, int id, int reg, int val)
+{
+	phy->mdio_write(phy->dev, id, reg, val);
+}
+
+static inline int phy_read(struct mii_phy* phy, int reg)
+{
+	return phy->mdio_read(phy->dev, phy->mii_id, reg);
+}
+
+static inline void phy_write(struct mii_phy* phy, int reg, int val)
+{
+	phy->mdio_write(phy->dev, phy->mii_id, reg, val);
+}
+
+static int reset_one_mii_phy(struct mii_phy* phy, int phy_id)
+{
+	u16 val;
+	int limit = 10000;
+
+	val = __phy_read(phy, phy_id, MII_BMCR);
+	val &= ~(BMCR_ISOLATE | BMCR_PDOWN);
+	val |= BMCR_RESET;
+	__phy_write(phy, phy_id, MII_BMCR, val);
+
+	udelay(100);
+
+	while (--limit) {
+		val = __phy_read(phy, phy_id, MII_BMCR);
+		if ((val & BMCR_RESET) == 0)
+			break;
+		udelay(10);
+	}
+	if ((val & BMCR_ISOLATE) && limit > 0)
+		__phy_write(phy, phy_id, MII_BMCR, val & ~BMCR_ISOLATE);
+
+	return limit <= 0;
+}
+
+static int bcm5201_init(struct mii_phy* phy)
+{
+	u16 data;
+
+	data = phy_read(phy, MII_BCM5201_MULTIPHY);
+	data &= ~MII_BCM5201_MULTIPHY_SUPERISOLATE;
+	phy_write(phy, MII_BCM5201_MULTIPHY, data);
+
+	phy_write(phy, MII_BCM5201_INTERRUPT, 0);
+
+	return 0;
+}
+
+static int bcm5201_suspend(struct mii_phy* phy)
+{
+	phy_write(phy, MII_BCM5201_INTERRUPT, 0);
+	phy_write(phy, MII_BCM5201_MULTIPHY, MII_BCM5201_MULTIPHY_SUPERISOLATE);
+
+	return 0;
+}
+
+static int bcm5221_init(struct mii_phy* phy)
+{
+	u16 data;
+
+	data = phy_read(phy, MII_BCM5221_TEST);
+	phy_write(phy, MII_BCM5221_TEST,
+		data | MII_BCM5221_TEST_ENABLE_SHADOWS);
+
+	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_STAT2);
+	phy_write(phy, MII_BCM5221_SHDOW_AUX_STAT2,
+		data | MII_BCM5221_SHDOW_AUX_STAT2_APD);
+
+	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_MODE4);
+	phy_write(phy, MII_BCM5221_SHDOW_AUX_MODE4,
+		data | MII_BCM5221_SHDOW_AUX_MODE4_CLKLOPWR);
+
+	data = phy_read(phy, MII_BCM5221_TEST);
+	phy_write(phy, MII_BCM5221_TEST,
+		data & ~MII_BCM5221_TEST_ENABLE_SHADOWS);
+
+	return 0;
+}
+
+static int bcm5221_suspend(struct mii_phy* phy)
+{
+	u16 data;
+
+	data = phy_read(phy, MII_BCM5221_TEST);
+	phy_write(phy, MII_BCM5221_TEST,
+		data | MII_BCM5221_TEST_ENABLE_SHADOWS);
+
+	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_MODE4);
+	phy_write(phy, MII_BCM5221_SHDOW_AUX_MODE4,
+		  data | MII_BCM5221_SHDOW_AUX_MODE4_IDDQMODE);
+
+	return 0;
+}
+
+static int bcm5241_init(struct mii_phy* phy)
+{
+	u16 data;
+
+	data = phy_read(phy, MII_BCM5221_TEST);
+	phy_write(phy, MII_BCM5221_TEST,
+		data | MII_BCM5221_TEST_ENABLE_SHADOWS);
+
+	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_STAT2);
+	phy_write(phy, MII_BCM5221_SHDOW_AUX_STAT2,
+		data | MII_BCM5221_SHDOW_AUX_STAT2_APD);
+
+	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_MODE4);
+	phy_write(phy, MII_BCM5221_SHDOW_AUX_MODE4,
+		data & ~MII_BCM5241_SHDOW_AUX_MODE4_STANDBYPWR);
+
+	data = phy_read(phy, MII_BCM5221_TEST);
+	phy_write(phy, MII_BCM5221_TEST,
+		data & ~MII_BCM5221_TEST_ENABLE_SHADOWS);
+
+	return 0;
+}
+
+static int bcm5241_suspend(struct mii_phy* phy)
+{
+	u16 data;
+
+	data = phy_read(phy, MII_BCM5221_TEST);
+	phy_write(phy, MII_BCM5221_TEST,
+		data | MII_BCM5221_TEST_ENABLE_SHADOWS);
+
+	data = phy_read(phy, MII_BCM5221_SHDOW_AUX_MODE4);
+	phy_write(phy, MII_BCM5221_SHDOW_AUX_MODE4,
+		  data | MII_BCM5241_SHDOW_AUX_MODE4_STANDBYPWR);
+
+	return 0;
+}
+
+static int bcm5400_init(struct mii_phy* phy)
+{
+	u16 data;
+
+	/* Configure for gigabit full duplex */
+	data = phy_read(phy, MII_BCM5400_AUXCONTROL);
+	data |= MII_BCM5400_AUXCONTROL_PWR10BASET;
+	phy_write(phy, MII_BCM5400_AUXCONTROL, data);
+
+	data = phy_read(phy, MII_BCM5400_GB_CONTROL);
+	data |= MII_BCM5400_GB_CONTROL_FULLDUPLEXCAP;
+	phy_write(phy, MII_BCM5400_GB_CONTROL, data);
+
+	udelay(100);
+
+	/* Reset and configure cascaded 10/100 PHY */
+	(void)reset_one_mii_phy(phy, 0x1f);
+
+	data = __phy_read(phy, 0x1f, MII_BCM5201_MULTIPHY);
+	data |= MII_BCM5201_MULTIPHY_SERIALMODE;
+	__phy_write(phy, 0x1f, MII_BCM5201_MULTIPHY, data);
+
+	data = phy_read(phy, MII_BCM5400_AUXCONTROL);
+	data &= ~MII_BCM5400_AUXCONTROL_PWR10BASET;
+	phy_write(phy, MII_BCM5400_AUXCONTROL, data);
+
+	return 0;
+}
+
+static int bcm5400_suspend(struct mii_phy* phy)
+{
+#if 0 /* Commented out in Darwin... someone has those dawn docs ? */
+	phy_write(phy, MII_BMCR, BMCR_PDOWN);
+#endif
+	return 0;
+}
+
+static int bcm5401_init(struct mii_phy* phy)
+{
+	u16 data;
+	int rev;
+
+	rev = phy_read(phy, MII_PHYSID2) & 0x000f;
+	if (rev == 0 || rev == 3) {
+		/* Some revisions of 5401 appear to need this
+		 * initialisation sequence to disable, according
+		 * to OF, "tap power management"
+		 *
+		 * WARNING ! OF and Darwin don't agree on the
+		 * register addresses. OF seem to interpret the
+		 * register numbers below as decimal
+		 *
+		 * Note: This should (and does) match tg3_init_5401phy_dsp
+		 *       in the tg3.c driver. -DaveM
+		 */
+		phy_write(phy, 0x18, 0x0c20);
+		phy_write(phy, 0x17, 0x0012);
+		phy_write(phy, 0x15, 0x1804);
+		phy_write(phy, 0x17, 0x0013);
+		phy_write(phy, 0x15, 0x1204);
+		phy_write(phy, 0x17, 0x8006);
+		phy_write(phy, 0x15, 0x0132);
+		phy_write(phy, 0x17, 0x8006);
+		phy_write(phy, 0x15, 0x0232);
+		phy_write(phy, 0x17, 0x201f);
+		phy_write(phy, 0x15, 0x0a20);
+	}
+
+	/* Configure for gigabit full duplex */
+	data = phy_read(phy, MII_BCM5400_GB_CONTROL);
+	data |= MII_BCM5400_GB_CONTROL_FULLDUPLEXCAP;
+	phy_write(phy, MII_BCM5400_GB_CONTROL, data);
+
+	udelay(10);
+
+	/* Reset and configure cascaded 10/100 PHY */
+	(void)reset_one_mii_phy(phy, 0x1f);
+
+	data = __phy_read(phy, 0x1f, MII_BCM5201_MULTIPHY);
+	data |= MII_BCM5201_MULTIPHY_SERIALMODE;
+	__phy_write(phy, 0x1f, MII_BCM5201_MULTIPHY, data);
+
+	return 0;
+}
+
+static int bcm5401_suspend(struct mii_phy* phy)
+{
+#if 0 /* Commented out in Darwin... someone has those dawn docs ? */
+	phy_write(phy, MII_BMCR, BMCR_PDOWN);
+#endif
+	return 0;
+}
+
+static int bcm5411_init(struct mii_phy* phy)
+{
+	u16 data;
+
+	/* Here's some more Apple black magic to setup
+	 * some voltage stuffs.
+	 */
+	phy_write(phy, 0x1c, 0x8c23);
+	phy_write(phy, 0x1c, 0x8ca3);
+	phy_write(phy, 0x1c, 0x8c23);
+
+	/* Here, Apple seems to want to reset it, do
+	 * it as well
+	 */
+	phy_write(phy, MII_BMCR, BMCR_RESET);
+	phy_write(phy, MII_BMCR, 0x1340);
+
+	data = phy_read(phy, MII_BCM5400_GB_CONTROL);
+	data |= MII_BCM5400_GB_CONTROL_FULLDUPLEXCAP;
+	phy_write(phy, MII_BCM5400_GB_CONTROL, data);
+
+	udelay(10);
+
+	/* Reset and configure cascaded 10/100 PHY */
+	(void)reset_one_mii_phy(phy, 0x1f);
+
+	return 0;
+}
+
+static int genmii_setup_aneg(struct mii_phy *phy, u32 advertise)
+{
+	u16 ctl, adv;
+
+	phy->autoneg = 1;
+	phy->speed = SPEED_10;
+	phy->duplex = DUPLEX_HALF;
+	phy->pause = 0;
+	phy->advertising = advertise;
+
+	/* Setup standard advertise */
+	adv = phy_read(phy, MII_ADVERTISE);
+	adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
+	if (advertise & ADVERTISED_10baseT_Half)
+		adv |= ADVERTISE_10HALF;
+	if (advertise & ADVERTISED_10baseT_Full)
+		adv |= ADVERTISE_10FULL;
+	if (advertise & ADVERTISED_100baseT_Half)
+		adv |= ADVERTISE_100HALF;
+	if (advertise & ADVERTISED_100baseT_Full)
+		adv |= ADVERTISE_100FULL;
+	phy_write(phy, MII_ADVERTISE, adv);
+
+	/* Start/Restart aneg */
+	ctl = phy_read(phy, MII_BMCR);
+	ctl |= (BMCR_ANENABLE | BMCR_ANRESTART);
+	phy_write(phy, MII_BMCR, ctl);
+
+	return 0;
+}
+
+static int genmii_setup_forced(struct mii_phy *phy, int speed, int fd)
+{
+	u16 ctl;
+
+	phy->autoneg = 0;
+	phy->speed = speed;
+	phy->duplex = fd;
+	phy->pause = 0;
+
+	ctl = phy_read(phy, MII_BMCR);
+	ctl &= ~(BMCR_FULLDPLX|BMCR_SPEED100|BMCR_ANENABLE);
+
+	/* First reset the PHY */
+	phy_write(phy, MII_BMCR, ctl | BMCR_RESET);
+
+	/* Select speed & duplex */
+	switch(speed) {
+	case SPEED_10:
+		break;
+	case SPEED_100:
+		ctl |= BMCR_SPEED100;
+		break;
+	case SPEED_1000:
+	default:
+		return -EINVAL;
+	}
+	if (fd == DUPLEX_FULL)
+		ctl |= BMCR_FULLDPLX;
+	phy_write(phy, MII_BMCR, ctl);
+
+	return 0;
+}
+
+static int genmii_poll_link(struct mii_phy *phy)
+{
+	u16 status;
+
+	(void)phy_read(phy, MII_BMSR);
+	status = phy_read(phy, MII_BMSR);
+	if ((status & BMSR_LSTATUS) == 0)
+		return 0;
+	if (phy->autoneg && !(status & BMSR_ANEGCOMPLETE))
+		return 0;
+	return 1;
+}
+
+static int genmii_read_link(struct mii_phy *phy)
+{
+	u16 lpa;
+
+	if (phy->autoneg) {
+		lpa = phy_read(phy, MII_LPA);
+
+		if (lpa & (LPA_10FULL | LPA_100FULL))
+			phy->duplex = DUPLEX_FULL;
+		else
+			phy->duplex = DUPLEX_HALF;
+		if (lpa & (LPA_100FULL | LPA_100HALF))
+			phy->speed = SPEED_100;
+		else
+			phy->speed = SPEED_10;
+		phy->pause = 0;
+	}
+	/* On non-aneg, we assume what we put in BMCR is the speed,
+	 * though magic-aneg shouldn't prevent this case from occurring
+	 */
+
+	 return 0;
+}
+
+static int generic_suspend(struct mii_phy* phy)
+{
+	phy_write(phy, MII_BMCR, BMCR_PDOWN);
+
+	return 0;
+}
+
+static int bcm5421_init(struct mii_phy* phy)
+{
+	u16 data;
+	unsigned int id;
+
+	id = (phy_read(phy, MII_PHYSID1) << 16 | phy_read(phy, MII_PHYSID2));
+
+	/* Revision 0 of 5421 needs some fixups */
+	if (id == 0x002060e0) {
+		/* This is borrowed from MacOS
+		 */
+		phy_write(phy, 0x18, 0x1007);
+		data = phy_read(phy, 0x18);
+		phy_write(phy, 0x18, data | 0x0400);
+		phy_write(phy, 0x18, 0x0007);
+		data = phy_read(phy, 0x18);
+		phy_write(phy, 0x18, data | 0x0800);
+		phy_write(phy, 0x17, 0x000a);
+		data = phy_read(phy, 0x15);
+		phy_write(phy, 0x15, data | 0x0200);
+	}
+
+	/* Pick up some init code from OF for K2 version */
+	if ((id & 0xfffffff0) == 0x002062e0) {
+		phy_write(phy, 4, 0x01e1);
+		phy_write(phy, 9, 0x0300);
+	}
+
+	/* Check if we can enable automatic low power */
+#ifdef CONFIG_PPC_PMAC
+	if (phy->platform_data) {
+		struct device_node *np = of_get_parent(phy->platform_data);
+		int can_low_power = 1;
+		if (np == NULL || of_get_property(np, "no-autolowpower", NULL))
+			can_low_power = 0;
+		if (can_low_power) {
+			/* Enable automatic low-power */
+			phy_write(phy, 0x1c, 0x9002);
+			phy_write(phy, 0x1c, 0xa821);
+			phy_write(phy, 0x1c, 0x941d);
+		}
+	}
+#endif /* CONFIG_PPC_PMAC */
+
+	return 0;
+}
+
+static int bcm54xx_setup_aneg(struct mii_phy *phy, u32 advertise)
+{
+	u16 ctl, adv;
+
+	phy->autoneg = 1;
+	phy->speed = SPEED_10;
+	phy->duplex = DUPLEX_HALF;
+	phy->pause = 0;
+	phy->advertising = advertise;
+
+	/* Setup standard advertise */
+	adv = phy_read(phy, MII_ADVERTISE);
+	adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
+	if (advertise & ADVERTISED_10baseT_Half)
+		adv |= ADVERTISE_10HALF;
+	if (advertise & ADVERTISED_10baseT_Full)
+		adv |= ADVERTISE_10FULL;
+	if (advertise & ADVERTISED_100baseT_Half)
+		adv |= ADVERTISE_100HALF;
+	if (advertise & ADVERTISED_100baseT_Full)
+		adv |= ADVERTISE_100FULL;
+	if (advertise & ADVERTISED_Pause)
+		adv |= ADVERTISE_PAUSE_CAP;
+	if (advertise & ADVERTISED_Asym_Pause)
+		adv |= ADVERTISE_PAUSE_ASYM;
+	phy_write(phy, MII_ADVERTISE, adv);
+
+	/* Setup 1000BT advertise */
+	adv = phy_read(phy, MII_1000BASETCONTROL);
+	adv &= ~(MII_1000BASETCONTROL_FULLDUPLEXCAP|MII_1000BASETCONTROL_HALFDUPLEXCAP);
+	if (advertise & SUPPORTED_1000baseT_Half)
+		adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP;
+	if (advertise & SUPPORTED_1000baseT_Full)
+		adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP;
+	phy_write(phy, MII_1000BASETCONTROL, adv);
+
+	/* Start/Restart aneg */
+	ctl = phy_read(phy, MII_BMCR);
+	ctl |= (BMCR_ANENABLE | BMCR_ANRESTART);
+	phy_write(phy, MII_BMCR, ctl);
+
+	return 0;
+}
+
+static int bcm54xx_setup_forced(struct mii_phy *phy, int speed, int fd)
+{
+	u16 ctl;
+
+	phy->autoneg = 0;
+	phy->speed = speed;
+	phy->duplex = fd;
+	phy->pause = 0;
+
+	ctl = phy_read(phy, MII_BMCR);
+	ctl &= ~(BMCR_FULLDPLX|BMCR_SPEED100|BMCR_SPD2|BMCR_ANENABLE);
+
+	/* First reset the PHY */
+	phy_write(phy, MII_BMCR, ctl | BMCR_RESET);
+
+	/* Select speed & duplex */
+	switch(speed) {
+	case SPEED_10:
+		break;
+	case SPEED_100:
+		ctl |= BMCR_SPEED100;
+		break;
+	case SPEED_1000:
+		ctl |= BMCR_SPD2;
+	}
+	if (fd == DUPLEX_FULL)
+		ctl |= BMCR_FULLDPLX;
+
+	// XXX Should we set the sungem to GII now on 1000BT ?
+
+	phy_write(phy, MII_BMCR, ctl);
+
+	return 0;
+}
+
+static int bcm54xx_read_link(struct mii_phy *phy)
+{
+	int link_mode;
+	u16 val;
+
+	if (phy->autoneg) {
+	    	val = phy_read(phy, MII_BCM5400_AUXSTATUS);
+		link_mode = ((val & MII_BCM5400_AUXSTATUS_LINKMODE_MASK) >>
+			     MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT);
+		phy->duplex = phy_BCM5400_link_table[link_mode][0] ?
+			DUPLEX_FULL : DUPLEX_HALF;
+		phy->speed = phy_BCM5400_link_table[link_mode][2] ?
+				SPEED_1000 :
+				(phy_BCM5400_link_table[link_mode][1] ?
+				 SPEED_100 : SPEED_10);
+		val = phy_read(phy, MII_LPA);
+		phy->pause = (phy->duplex == DUPLEX_FULL) &&
+			((val & LPA_PAUSE) != 0);
+	}
+	/* On non-aneg, we assume what we put in BMCR is the speed,
+	 * though magic-aneg shouldn't prevent this case from occurring
+	 */
+
+	return 0;
+}
+
+static int marvell88e1111_init(struct mii_phy* phy)
+{
+	u16 rev;
+
+	/* magic init sequence for rev 0 */
+	rev = phy_read(phy, MII_PHYSID2) & 0x000f;
+	if (rev == 0) {
+		phy_write(phy, 0x1d, 0x000a);
+		phy_write(phy, 0x1e, 0x0821);
+
+		phy_write(phy, 0x1d, 0x0006);
+		phy_write(phy, 0x1e, 0x8600);
+
+		phy_write(phy, 0x1d, 0x000b);
+		phy_write(phy, 0x1e, 0x0100);
+
+		phy_write(phy, 0x1d, 0x0004);
+		phy_write(phy, 0x1e, 0x4850);
+	}
+	return 0;
+}
+
+#define BCM5421_MODE_MASK	(1 << 5)
+
+static int bcm5421_poll_link(struct mii_phy* phy)
+{
+	u32 phy_reg;
+	int mode;
+
+	/* find out in what mode we are */
+	phy_write(phy, MII_NCONFIG, 0x1000);
+	phy_reg = phy_read(phy, MII_NCONFIG);
+
+	mode = (phy_reg & BCM5421_MODE_MASK) >> 5;
+
+	if ( mode == BCM54XX_COPPER)
+		return genmii_poll_link(phy);
+
+	/* try to find out wether we have a link */
+	phy_write(phy, MII_NCONFIG, 0x2000);
+	phy_reg = phy_read(phy, MII_NCONFIG);
+
+	if (phy_reg & 0x0020)
+		return 0;
+	else
+		return 1;
+}
+
+static int bcm5421_read_link(struct mii_phy* phy)
+{
+	u32 phy_reg;
+	int mode;
+
+	/* find out in what mode we are */
+	phy_write(phy, MII_NCONFIG, 0x1000);
+	phy_reg = phy_read(phy, MII_NCONFIG);
+
+	mode = (phy_reg & BCM5421_MODE_MASK ) >> 5;
+
+	if ( mode == BCM54XX_COPPER)
+		return bcm54xx_read_link(phy);
+
+	phy->speed = SPEED_1000;
+
+	/* find out wether we are running half- or full duplex */
+	phy_write(phy, MII_NCONFIG, 0x2000);
+	phy_reg = phy_read(phy, MII_NCONFIG);
+
+	if ( (phy_reg & 0x0080) >> 7)
+		phy->duplex |=  DUPLEX_HALF;
+	else
+		phy->duplex |=  DUPLEX_FULL;
+
+	return 0;
+}
+
+static int bcm5421_enable_fiber(struct mii_phy* phy, int autoneg)
+{
+	/* enable fiber mode */
+	phy_write(phy, MII_NCONFIG, 0x9020);
+	/* LEDs active in both modes, autosense prio = fiber */
+	phy_write(phy, MII_NCONFIG, 0x945f);
+
+	if (!autoneg) {
+		/* switch off fibre autoneg */
+		phy_write(phy, MII_NCONFIG, 0xfc01);
+		phy_write(phy, 0x0b, 0x0004);
+	}
+
+	phy->autoneg = autoneg;
+
+	return 0;
+}
+
+#define BCM5461_FIBER_LINK	(1 << 2)
+#define BCM5461_MODE_MASK	(3 << 1)
+
+static int bcm5461_poll_link(struct mii_phy* phy)
+{
+	u32 phy_reg;
+	int mode;
+
+	/* find out in what mode we are */
+	phy_write(phy, MII_NCONFIG, 0x7c00);
+	phy_reg = phy_read(phy, MII_NCONFIG);
+
+	mode = (phy_reg & BCM5461_MODE_MASK ) >> 1;
+
+	if ( mode == BCM54XX_COPPER)
+		return genmii_poll_link(phy);
+
+	/* find out wether we have a link */
+	phy_write(phy, MII_NCONFIG, 0x7000);
+	phy_reg = phy_read(phy, MII_NCONFIG);
+
+	if (phy_reg & BCM5461_FIBER_LINK)
+		return 1;
+	else
+		return 0;
+}
+
+#define BCM5461_FIBER_DUPLEX	(1 << 3)
+
+static int bcm5461_read_link(struct mii_phy* phy)
+{
+	u32 phy_reg;
+	int mode;
+
+	/* find out in what mode we are */
+	phy_write(phy, MII_NCONFIG, 0x7c00);
+	phy_reg = phy_read(phy, MII_NCONFIG);
+
+	mode = (phy_reg & BCM5461_MODE_MASK ) >> 1;
+
+	if ( mode == BCM54XX_COPPER) {
+		return bcm54xx_read_link(phy);
+	}
+
+	phy->speed = SPEED_1000;
+
+	/* find out wether we are running half- or full duplex */
+	phy_write(phy, MII_NCONFIG, 0x7000);
+	phy_reg = phy_read(phy, MII_NCONFIG);
+
+	if (phy_reg & BCM5461_FIBER_DUPLEX)
+		phy->duplex |=  DUPLEX_FULL;
+	else
+		phy->duplex |=  DUPLEX_HALF;
+
+	return 0;
+}
+
+static int bcm5461_enable_fiber(struct mii_phy* phy, int autoneg)
+{
+	/* select fiber mode, enable 1000 base-X registers */
+	phy_write(phy, MII_NCONFIG, 0xfc0b);
+
+	if (autoneg) {
+		/* enable fiber with no autonegotiation */
+		phy_write(phy, MII_ADVERTISE, 0x01e0);
+		phy_write(phy, MII_BMCR, 0x1140);
+	} else {
+		/* enable fiber with autonegotiation */
+		phy_write(phy, MII_BMCR, 0x0140);
+	}
+
+	phy->autoneg = autoneg;
+
+	return 0;
+}
+
+static int marvell_setup_aneg(struct mii_phy *phy, u32 advertise)
+{
+	u16 ctl, adv;
+
+	phy->autoneg = 1;
+	phy->speed = SPEED_10;
+	phy->duplex = DUPLEX_HALF;
+	phy->pause = 0;
+	phy->advertising = advertise;
+
+	/* Setup standard advertise */
+	adv = phy_read(phy, MII_ADVERTISE);
+	adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
+	if (advertise & ADVERTISED_10baseT_Half)
+		adv |= ADVERTISE_10HALF;
+	if (advertise & ADVERTISED_10baseT_Full)
+		adv |= ADVERTISE_10FULL;
+	if (advertise & ADVERTISED_100baseT_Half)
+		adv |= ADVERTISE_100HALF;
+	if (advertise & ADVERTISED_100baseT_Full)
+		adv |= ADVERTISE_100FULL;
+	if (advertise & ADVERTISED_Pause)
+		adv |= ADVERTISE_PAUSE_CAP;
+	if (advertise & ADVERTISED_Asym_Pause)
+		adv |= ADVERTISE_PAUSE_ASYM;
+	phy_write(phy, MII_ADVERTISE, adv);
+
+	/* Setup 1000BT advertise & enable crossover detect
+	 * XXX How do we advertise 1000BT ? Darwin source is
+	 * confusing here, they read from specific control and
+	 * write to control... Someone has specs for those
+	 * beasts ?
+	 */
+	adv = phy_read(phy, MII_M1011_PHY_SPEC_CONTROL);
+	adv |= MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX;
+	adv &= ~(MII_1000BASETCONTROL_FULLDUPLEXCAP |
+			MII_1000BASETCONTROL_HALFDUPLEXCAP);
+	if (advertise & SUPPORTED_1000baseT_Half)
+		adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP;
+	if (advertise & SUPPORTED_1000baseT_Full)
+		adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP;
+	phy_write(phy, MII_1000BASETCONTROL, adv);
+
+	/* Start/Restart aneg */
+	ctl = phy_read(phy, MII_BMCR);
+	ctl |= (BMCR_ANENABLE | BMCR_ANRESTART);
+	phy_write(phy, MII_BMCR, ctl);
+
+	return 0;
+}
+
+static int marvell_setup_forced(struct mii_phy *phy, int speed, int fd)
+{
+	u16 ctl, ctl2;
+
+	phy->autoneg = 0;
+	phy->speed = speed;
+	phy->duplex = fd;
+	phy->pause = 0;
+
+	ctl = phy_read(phy, MII_BMCR);
+	ctl &= ~(BMCR_FULLDPLX|BMCR_SPEED100|BMCR_SPD2|BMCR_ANENABLE);
+	ctl |= BMCR_RESET;
+
+	/* Select speed & duplex */
+	switch(speed) {
+	case SPEED_10:
+		break;
+	case SPEED_100:
+		ctl |= BMCR_SPEED100;
+		break;
+	/* I'm not sure about the one below, again, Darwin source is
+	 * quite confusing and I lack chip specs
+	 */
+	case SPEED_1000:
+		ctl |= BMCR_SPD2;
+	}
+	if (fd == DUPLEX_FULL)
+		ctl |= BMCR_FULLDPLX;
+
+	/* Disable crossover. Again, the way Apple does it is strange,
+	 * though I don't assume they are wrong ;)
+	 */
+	ctl2 = phy_read(phy, MII_M1011_PHY_SPEC_CONTROL);
+	ctl2 &= ~(MII_M1011_PHY_SPEC_CONTROL_MANUAL_MDIX |
+		MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX |
+		MII_1000BASETCONTROL_FULLDUPLEXCAP |
+		MII_1000BASETCONTROL_HALFDUPLEXCAP);
+	if (speed == SPEED_1000)
+		ctl2 |= (fd == DUPLEX_FULL) ?
+			MII_1000BASETCONTROL_FULLDUPLEXCAP :
+			MII_1000BASETCONTROL_HALFDUPLEXCAP;
+	phy_write(phy, MII_1000BASETCONTROL, ctl2);
+
+	// XXX Should we set the sungem to GII now on 1000BT ?
+
+	phy_write(phy, MII_BMCR, ctl);
+
+	return 0;
+}
+
+static int marvell_read_link(struct mii_phy *phy)
+{
+	u16 status, pmask;
+
+	if (phy->autoneg) {
+		status = phy_read(phy, MII_M1011_PHY_SPEC_STATUS);
+		if ((status & MII_M1011_PHY_SPEC_STATUS_RESOLVED) == 0)
+			return -EAGAIN;
+		if (status & MII_M1011_PHY_SPEC_STATUS_1000)
+			phy->speed = SPEED_1000;
+		else if (status & MII_M1011_PHY_SPEC_STATUS_100)
+			phy->speed = SPEED_100;
+		else
+			phy->speed = SPEED_10;
+		if (status & MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX)
+			phy->duplex = DUPLEX_FULL;
+		else
+			phy->duplex = DUPLEX_HALF;
+		pmask = MII_M1011_PHY_SPEC_STATUS_TX_PAUSE |
+			MII_M1011_PHY_SPEC_STATUS_RX_PAUSE;
+		phy->pause = (status & pmask) == pmask;
+	}
+	/* On non-aneg, we assume what we put in BMCR is the speed,
+	 * though magic-aneg shouldn't prevent this case from occurring
+	 */
+
+	return 0;
+}
+
+#define MII_BASIC_FEATURES \
+	(SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |	\
+	 SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |	\
+	 SUPPORTED_Autoneg | SUPPORTED_TP | SUPPORTED_MII |	\
+	 SUPPORTED_Pause)
+
+/* On gigabit capable PHYs, we advertise Pause support but not asym pause
+ * support for now as I'm not sure it's supported and Darwin doesn't do
+ * it neither. --BenH.
+ */
+#define MII_GBIT_FEATURES \
+	(MII_BASIC_FEATURES |	\
+	 SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full)
+
+/* Broadcom BCM 5201 */
+static struct mii_phy_ops bcm5201_phy_ops = {
+	.init		= bcm5201_init,
+	.suspend	= bcm5201_suspend,
+	.setup_aneg	= genmii_setup_aneg,
+	.setup_forced	= genmii_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= genmii_read_link,
+};
+
+static struct mii_phy_def bcm5201_phy_def = {
+	.phy_id		= 0x00406210,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "BCM5201",
+	.features	= MII_BASIC_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &bcm5201_phy_ops
+};
+
+/* Broadcom BCM 5221 */
+static struct mii_phy_ops bcm5221_phy_ops = {
+	.suspend	= bcm5221_suspend,
+	.init		= bcm5221_init,
+	.setup_aneg	= genmii_setup_aneg,
+	.setup_forced	= genmii_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= genmii_read_link,
+};
+
+static struct mii_phy_def bcm5221_phy_def = {
+	.phy_id		= 0x004061e0,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "BCM5221",
+	.features	= MII_BASIC_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &bcm5221_phy_ops
+};
+
+/* Broadcom BCM 5241 */
+static struct mii_phy_ops bcm5241_phy_ops = {
+	.suspend	= bcm5241_suspend,
+	.init		= bcm5241_init,
+	.setup_aneg	= genmii_setup_aneg,
+	.setup_forced	= genmii_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= genmii_read_link,
+};
+static struct mii_phy_def bcm5241_phy_def = {
+	.phy_id		= 0x0143bc30,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "BCM5241",
+	.features	= MII_BASIC_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &bcm5241_phy_ops
+};
+
+/* Broadcom BCM 5400 */
+static struct mii_phy_ops bcm5400_phy_ops = {
+	.init		= bcm5400_init,
+	.suspend	= bcm5400_suspend,
+	.setup_aneg	= bcm54xx_setup_aneg,
+	.setup_forced	= bcm54xx_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= bcm54xx_read_link,
+};
+
+static struct mii_phy_def bcm5400_phy_def = {
+	.phy_id		= 0x00206040,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "BCM5400",
+	.features	= MII_GBIT_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &bcm5400_phy_ops
+};
+
+/* Broadcom BCM 5401 */
+static struct mii_phy_ops bcm5401_phy_ops = {
+	.init		= bcm5401_init,
+	.suspend	= bcm5401_suspend,
+	.setup_aneg	= bcm54xx_setup_aneg,
+	.setup_forced	= bcm54xx_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= bcm54xx_read_link,
+};
+
+static struct mii_phy_def bcm5401_phy_def = {
+	.phy_id		= 0x00206050,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "BCM5401",
+	.features	= MII_GBIT_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &bcm5401_phy_ops
+};
+
+/* Broadcom BCM 5411 */
+static struct mii_phy_ops bcm5411_phy_ops = {
+	.init		= bcm5411_init,
+	.suspend	= generic_suspend,
+	.setup_aneg	= bcm54xx_setup_aneg,
+	.setup_forced	= bcm54xx_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= bcm54xx_read_link,
+};
+
+static struct mii_phy_def bcm5411_phy_def = {
+	.phy_id		= 0x00206070,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "BCM5411",
+	.features	= MII_GBIT_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &bcm5411_phy_ops
+};
+
+/* Broadcom BCM 5421 */
+static struct mii_phy_ops bcm5421_phy_ops = {
+	.init		= bcm5421_init,
+	.suspend	= generic_suspend,
+	.setup_aneg	= bcm54xx_setup_aneg,
+	.setup_forced	= bcm54xx_setup_forced,
+	.poll_link	= bcm5421_poll_link,
+	.read_link	= bcm5421_read_link,
+	.enable_fiber   = bcm5421_enable_fiber,
+};
+
+static struct mii_phy_def bcm5421_phy_def = {
+	.phy_id		= 0x002060e0,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "BCM5421",
+	.features	= MII_GBIT_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &bcm5421_phy_ops
+};
+
+/* Broadcom BCM 5421 built-in K2 */
+static struct mii_phy_ops bcm5421k2_phy_ops = {
+	.init		= bcm5421_init,
+	.suspend	= generic_suspend,
+	.setup_aneg	= bcm54xx_setup_aneg,
+	.setup_forced	= bcm54xx_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= bcm54xx_read_link,
+};
+
+static struct mii_phy_def bcm5421k2_phy_def = {
+	.phy_id		= 0x002062e0,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "BCM5421-K2",
+	.features	= MII_GBIT_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &bcm5421k2_phy_ops
+};
+
+static struct mii_phy_ops bcm5461_phy_ops = {
+	.init		= bcm5421_init,
+	.suspend	= generic_suspend,
+	.setup_aneg	= bcm54xx_setup_aneg,
+	.setup_forced	= bcm54xx_setup_forced,
+	.poll_link	= bcm5461_poll_link,
+	.read_link	= bcm5461_read_link,
+	.enable_fiber   = bcm5461_enable_fiber,
+};
+
+static struct mii_phy_def bcm5461_phy_def = {
+	.phy_id		= 0x002060c0,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "BCM5461",
+	.features	= MII_GBIT_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &bcm5461_phy_ops
+};
+
+/* Broadcom BCM 5462 built-in Vesta */
+static struct mii_phy_ops bcm5462V_phy_ops = {
+	.init		= bcm5421_init,
+	.suspend	= generic_suspend,
+	.setup_aneg	= bcm54xx_setup_aneg,
+	.setup_forced	= bcm54xx_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= bcm54xx_read_link,
+};
+
+static struct mii_phy_def bcm5462V_phy_def = {
+	.phy_id		= 0x002060d0,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "BCM5462-Vesta",
+	.features	= MII_GBIT_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &bcm5462V_phy_ops
+};
+
+/* Marvell 88E1101 amd 88E1111 */
+static struct mii_phy_ops marvell88e1101_phy_ops = {
+	.suspend	= generic_suspend,
+	.setup_aneg	= marvell_setup_aneg,
+	.setup_forced	= marvell_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= marvell_read_link
+};
+
+static struct mii_phy_ops marvell88e1111_phy_ops = {
+	.init		= marvell88e1111_init,
+	.suspend	= generic_suspend,
+	.setup_aneg	= marvell_setup_aneg,
+	.setup_forced	= marvell_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= marvell_read_link
+};
+
+/* two revs in darwin for the 88e1101 ... I could use a datasheet
+ * to get the proper names...
+ */
+static struct mii_phy_def marvell88e1101v1_phy_def = {
+	.phy_id		= 0x01410c20,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "Marvell 88E1101v1",
+	.features	= MII_GBIT_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &marvell88e1101_phy_ops
+};
+static struct mii_phy_def marvell88e1101v2_phy_def = {
+	.phy_id		= 0x01410c60,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "Marvell 88E1101v2",
+	.features	= MII_GBIT_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &marvell88e1101_phy_ops
+};
+static struct mii_phy_def marvell88e1111_phy_def = {
+	.phy_id		= 0x01410cc0,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "Marvell 88E1111",
+	.features	= MII_GBIT_FEATURES,
+	.magic_aneg	= 1,
+	.ops		= &marvell88e1111_phy_ops
+};
+
+/* Generic implementation for most 10/100 PHYs */
+static struct mii_phy_ops generic_phy_ops = {
+	.setup_aneg	= genmii_setup_aneg,
+	.setup_forced	= genmii_setup_forced,
+	.poll_link	= genmii_poll_link,
+	.read_link	= genmii_read_link
+};
+
+static struct mii_phy_def genmii_phy_def = {
+	.phy_id		= 0x00000000,
+	.phy_id_mask	= 0x00000000,
+	.name		= "Generic MII",
+	.features	= MII_BASIC_FEATURES,
+	.magic_aneg	= 0,
+	.ops		= &generic_phy_ops
+};
+
+static struct mii_phy_def* mii_phy_table[] = {
+	&bcm5201_phy_def,
+	&bcm5221_phy_def,
+	&bcm5241_phy_def,
+	&bcm5400_phy_def,
+	&bcm5401_phy_def,
+	&bcm5411_phy_def,
+	&bcm5421_phy_def,
+	&bcm5421k2_phy_def,
+	&bcm5461_phy_def,
+	&bcm5462V_phy_def,
+	&marvell88e1101v1_phy_def,
+	&marvell88e1101v2_phy_def,
+	&marvell88e1111_phy_def,
+	&genmii_phy_def,
+	NULL
+};
+
+int sungem_phy_probe(struct mii_phy *phy, int mii_id)
+{
+	int rc;
+	u32 id;
+	struct mii_phy_def* def;
+	int i;
+
+	/* We do not reset the mii_phy structure as the driver
+	 * may re-probe the PHY regulary
+	 */
+	phy->mii_id = mii_id;
+
+	/* Take PHY out of isloate mode and reset it. */
+	rc = reset_one_mii_phy(phy, mii_id);
+	if (rc)
+		goto fail;
+
+	/* Read ID and find matching entry */
+	id = (phy_read(phy, MII_PHYSID1) << 16 | phy_read(phy, MII_PHYSID2));
+	printk(KERN_DEBUG KBUILD_MODNAME ": " "PHY ID: %x, addr: %x\n",
+	       id, mii_id);
+	for (i=0; (def = mii_phy_table[i]) != NULL; i++)
+		if ((id & def->phy_id_mask) == def->phy_id)
+			break;
+	/* Should never be NULL (we have a generic entry), but... */
+	if (def == NULL)
+		goto fail;
+
+	phy->def = def;
+
+	return 0;
+fail:
+	phy->speed = 0;
+	phy->duplex = 0;
+	phy->pause = 0;
+	phy->advertising = 0;
+	return -ENODEV;
+}
+
+EXPORT_SYMBOL(sungem_phy_probe);
+MODULE_LICENSE("GPL");
diff --git a/include/linux/sungem_phy.h b/include/linux/sungem_phy.h
index af02f94..bd9be9f 100644
--- a/include/linux/sungem_phy.h
+++ b/include/linux/sungem_phy.h
@@ -61,7 +61,7 @@ struct mii_phy
 /* Pass in a struct mii_phy with dev, mdio_read and mdio_write
  * filled, the remaining fields will be filled on return
  */
-extern int mii_phy_probe(struct mii_phy *phy, int mii_id);
+extern int sungem_phy_probe(struct mii_phy *phy, int mii_id);
 
 
 /* MII definitions missing from mii.h */
-- 
1.7.6


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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-08-15  5:56 ` David Miller
@ 2011-08-16  5:28   ` Stephen Rothwell
  2011-08-16  6:11     ` David Miller
  0 siblings, 1 reply; 105+ messages in thread
From: Stephen Rothwell @ 2011-08-16  5:28 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-next, linux-kernel, jeffrey.t.kirsher

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

Hi Dave,

On Sun, 14 Aug 2011 22:56:10 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> This should fix the include problem, but I suspect this thing won't
> link.

Yep, indeed, today I get:

make[5]: *** No rule to make target `drivers/net/ethernet/toshiba/ethernet/sun/sungem_phy.o', needed by `drivers/net/ethernet/toshiba/built-in.o'.

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-08-15  5:20 Stephen Rothwell
@ 2011-08-15  5:56 ` David Miller
  2011-08-16  5:28   ` Stephen Rothwell
  0 siblings, 1 reply; 105+ messages in thread
From: David Miller @ 2011-08-15  5:56 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, jeffrey.t.kirsher

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 15 Aug 2011 15:20:48 +1000

> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> make[5]: *** No rule to make target `drivers/net/ethernet/toshiba/ethernet/sun/sungem_phy.o', needed by `drivers/net/ethernet/toshiba/built-in.o'.
> In file included from drivers/net/ethernet/toshiba/spider_net_ethtool.c:28:0:
> drivers/net/ethernet/toshiba/spider_net.h:30:39: fatal error: ./ethernet/sun/sungem_phy.h: No such file or directory
> In file included from drivers/net/ethernet/toshiba/spider_net.c:54:0:
> drivers/net/ethernet/toshiba/spider_net.h:30:39: fatal error: ./ethernet/sun/sungem_phy.h: No such file or directory
> 
> Caused by commit 8df158ac36fa ("toshiba: Move the Toshiba drivers") or
> the surrounding commits.
> 
> I have just left this failure for today.

This should fix the include problem, but I suspect this thing won't
link.

Jeff we have to resolve this somehow, I explained last week how
you can't include object files outside of the current directory
in constructs like is being done for the spider_net driver in
order to get the sungem_phy.o thing tacked on.

--------------------
>From 2bb698412d8aab0bfc3f269f5ebe8eb67d7cc8f4 Mon Sep 17 00:00:00 2001
From: "David S. Miller" <davem@davemloft.net>
Date: Sun, 14 Aug 2011 22:52:04 -0700
Subject: [PATCH] net: Move sungem_phy.h under include/linux

Fixes build failures of the spider_net driver because it tries
to use a convoluted path to include this header.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/ethernet/sun/sungem.c         |    2 +-
 drivers/net/ethernet/sun/sungem_phy.h     |  132 -----------------------------
 drivers/net/ethernet/toshiba/spider_net.h |    2 +-
 include/linux/sungem_phy.h                |  132 +++++++++++++++++++++++++++++
 4 files changed, 134 insertions(+), 134 deletions(-)
 delete mode 100644 drivers/net/ethernet/sun/sungem_phy.h
 create mode 100644 include/linux/sungem_phy.h

diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c
index ade35dd..0f13c5d 100644
--- a/drivers/net/ethernet/sun/sungem.c
+++ b/drivers/net/ethernet/sun/sungem.c
@@ -59,7 +59,7 @@
 #include <asm/pmac_feature.h>
 #endif
 
-#include "sungem_phy.h"
+#include <linux/sungem_phy.h>
 #include "sungem.h"
 
 /* Stripping FCS is causing problems, disabled for now */
diff --git a/drivers/net/ethernet/sun/sungem_phy.h b/drivers/net/ethernet/sun/sungem_phy.h
deleted file mode 100644
index af02f94..0000000
--- a/drivers/net/ethernet/sun/sungem_phy.h
+++ /dev/null
@@ -1,132 +0,0 @@
-#ifndef __SUNGEM_PHY_H__
-#define __SUNGEM_PHY_H__
-
-struct mii_phy;
-
-/* Operations supported by any kind of PHY */
-struct mii_phy_ops
-{
-	int		(*init)(struct mii_phy *phy);
-	int		(*suspend)(struct mii_phy *phy);
-	int		(*setup_aneg)(struct mii_phy *phy, u32 advertise);
-	int		(*setup_forced)(struct mii_phy *phy, int speed, int fd);
-	int		(*poll_link)(struct mii_phy *phy);
-	int		(*read_link)(struct mii_phy *phy);
-	int		(*enable_fiber)(struct mii_phy *phy, int autoneg);
-};
-
-/* Structure used to statically define an mii/gii based PHY */
-struct mii_phy_def
-{
-	u32				phy_id;		/* Concatenated ID1 << 16 | ID2 */
-	u32				phy_id_mask;	/* Significant bits */
-	u32				features;	/* Ethtool SUPPORTED_* defines */
-	int				magic_aneg;	/* Autoneg does all speed test for us */
-	const char*			name;
-	const struct mii_phy_ops*	ops;
-};
-
-enum {
-	BCM54XX_COPPER,
-	BCM54XX_FIBER,
-	BCM54XX_GBIC,
-	BCM54XX_SGMII,
-	BCM54XX_UNKNOWN,
-};
-
-/* An instance of a PHY, partially borrowed from mii_if_info */
-struct mii_phy
-{
-	struct mii_phy_def*	def;
-	u32			advertising;
-	int			mii_id;
-
-	/* 1: autoneg enabled, 0: disabled */
-	int			autoneg;
-
-	/* forced speed & duplex (no autoneg)
-	 * partner speed & duplex & pause (autoneg)
-	 */
-	int			speed;
-	int			duplex;
-	int			pause;
-
-	/* Provided by host chip */
-	struct net_device	*dev;
-	int (*mdio_read) (struct net_device *dev, int mii_id, int reg);
-	void (*mdio_write) (struct net_device *dev, int mii_id, int reg, int val);
-	void			*platform_data;
-};
-
-/* Pass in a struct mii_phy with dev, mdio_read and mdio_write
- * filled, the remaining fields will be filled on return
- */
-extern int mii_phy_probe(struct mii_phy *phy, int mii_id);
-
-
-/* MII definitions missing from mii.h */
-
-#define BMCR_SPD2	0x0040		/* Gigabit enable (bcm54xx)	*/
-#define LPA_PAUSE	0x0400
-
-/* More PHY registers (model specific) */
-
-/* MII BCM5201 MULTIPHY interrupt register */
-#define MII_BCM5201_INTERRUPT			0x1A
-#define MII_BCM5201_INTERRUPT_INTENABLE		0x4000
-
-#define MII_BCM5201_AUXMODE2			0x1B
-#define MII_BCM5201_AUXMODE2_LOWPOWER		0x0008
-
-#define MII_BCM5201_MULTIPHY                    0x1E
-
-/* MII BCM5201 MULTIPHY register bits */
-#define MII_BCM5201_MULTIPHY_SERIALMODE         0x0002
-#define MII_BCM5201_MULTIPHY_SUPERISOLATE       0x0008
-
-/* MII BCM5221 Additional registers */
-#define MII_BCM5221_TEST			0x1f
-#define MII_BCM5221_TEST_ENABLE_SHADOWS		0x0080
-#define MII_BCM5221_SHDOW_AUX_STAT2		0x1b
-#define MII_BCM5221_SHDOW_AUX_STAT2_APD		0x0020
-#define MII_BCM5221_SHDOW_AUX_MODE4		0x1a
-#define MII_BCM5221_SHDOW_AUX_MODE4_IDDQMODE	0x0001
-#define MII_BCM5221_SHDOW_AUX_MODE4_CLKLOPWR	0x0004
-
-/* MII BCM5241 Additional registers */
-#define MII_BCM5241_SHDOW_AUX_MODE4_STANDBYPWR	0x0008
-
-/* MII BCM5400 1000-BASET Control register */
-#define MII_BCM5400_GB_CONTROL			0x09
-#define MII_BCM5400_GB_CONTROL_FULLDUPLEXCAP	0x0200
-
-/* MII BCM5400 AUXCONTROL register */
-#define MII_BCM5400_AUXCONTROL                  0x18
-#define MII_BCM5400_AUXCONTROL_PWR10BASET       0x0004
-
-/* MII BCM5400 AUXSTATUS register */
-#define MII_BCM5400_AUXSTATUS                   0x19
-#define MII_BCM5400_AUXSTATUS_LINKMODE_MASK     0x0700
-#define MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT    8
-
-/* 1000BT control (Marvell & BCM54xx at least) */
-#define MII_1000BASETCONTROL			0x09
-#define MII_1000BASETCONTROL_FULLDUPLEXCAP	0x0200
-#define MII_1000BASETCONTROL_HALFDUPLEXCAP	0x0100
-
-/* Marvell 88E1011 PHY control */
-#define MII_M1011_PHY_SPEC_CONTROL		0x10
-#define MII_M1011_PHY_SPEC_CONTROL_MANUAL_MDIX	0x20
-#define MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX	0x40
-
-/* Marvell 88E1011 PHY status */
-#define MII_M1011_PHY_SPEC_STATUS		0x11
-#define MII_M1011_PHY_SPEC_STATUS_1000		0x8000
-#define MII_M1011_PHY_SPEC_STATUS_100		0x4000
-#define MII_M1011_PHY_SPEC_STATUS_SPD_MASK	0xc000
-#define MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX	0x2000
-#define MII_M1011_PHY_SPEC_STATUS_RESOLVED	0x0800
-#define MII_M1011_PHY_SPEC_STATUS_TX_PAUSE	0x0008
-#define MII_M1011_PHY_SPEC_STATUS_RX_PAUSE	0x0004
-
-#endif /* __SUNGEM_PHY_H__ */
diff --git a/drivers/net/ethernet/toshiba/spider_net.h b/drivers/net/ethernet/toshiba/spider_net.h
index a891ad0..4ba2135 100644
--- a/drivers/net/ethernet/toshiba/spider_net.h
+++ b/drivers/net/ethernet/toshiba/spider_net.h
@@ -27,7 +27,7 @@
 
 #define VERSION "2.0 B"
 
-#include "./ethernet/sun/sungem_phy.h"
+#include <linux/sungem_phy.h>
 
 extern int spider_net_stop(struct net_device *netdev);
 extern int spider_net_open(struct net_device *netdev);
diff --git a/include/linux/sungem_phy.h b/include/linux/sungem_phy.h
new file mode 100644
index 0000000..af02f94
--- /dev/null
+++ b/include/linux/sungem_phy.h
@@ -0,0 +1,132 @@
+#ifndef __SUNGEM_PHY_H__
+#define __SUNGEM_PHY_H__
+
+struct mii_phy;
+
+/* Operations supported by any kind of PHY */
+struct mii_phy_ops
+{
+	int		(*init)(struct mii_phy *phy);
+	int		(*suspend)(struct mii_phy *phy);
+	int		(*setup_aneg)(struct mii_phy *phy, u32 advertise);
+	int		(*setup_forced)(struct mii_phy *phy, int speed, int fd);
+	int		(*poll_link)(struct mii_phy *phy);
+	int		(*read_link)(struct mii_phy *phy);
+	int		(*enable_fiber)(struct mii_phy *phy, int autoneg);
+};
+
+/* Structure used to statically define an mii/gii based PHY */
+struct mii_phy_def
+{
+	u32				phy_id;		/* Concatenated ID1 << 16 | ID2 */
+	u32				phy_id_mask;	/* Significant bits */
+	u32				features;	/* Ethtool SUPPORTED_* defines */
+	int				magic_aneg;	/* Autoneg does all speed test for us */
+	const char*			name;
+	const struct mii_phy_ops*	ops;
+};
+
+enum {
+	BCM54XX_COPPER,
+	BCM54XX_FIBER,
+	BCM54XX_GBIC,
+	BCM54XX_SGMII,
+	BCM54XX_UNKNOWN,
+};
+
+/* An instance of a PHY, partially borrowed from mii_if_info */
+struct mii_phy
+{
+	struct mii_phy_def*	def;
+	u32			advertising;
+	int			mii_id;
+
+	/* 1: autoneg enabled, 0: disabled */
+	int			autoneg;
+
+	/* forced speed & duplex (no autoneg)
+	 * partner speed & duplex & pause (autoneg)
+	 */
+	int			speed;
+	int			duplex;
+	int			pause;
+
+	/* Provided by host chip */
+	struct net_device	*dev;
+	int (*mdio_read) (struct net_device *dev, int mii_id, int reg);
+	void (*mdio_write) (struct net_device *dev, int mii_id, int reg, int val);
+	void			*platform_data;
+};
+
+/* Pass in a struct mii_phy with dev, mdio_read and mdio_write
+ * filled, the remaining fields will be filled on return
+ */
+extern int mii_phy_probe(struct mii_phy *phy, int mii_id);
+
+
+/* MII definitions missing from mii.h */
+
+#define BMCR_SPD2	0x0040		/* Gigabit enable (bcm54xx)	*/
+#define LPA_PAUSE	0x0400
+
+/* More PHY registers (model specific) */
+
+/* MII BCM5201 MULTIPHY interrupt register */
+#define MII_BCM5201_INTERRUPT			0x1A
+#define MII_BCM5201_INTERRUPT_INTENABLE		0x4000
+
+#define MII_BCM5201_AUXMODE2			0x1B
+#define MII_BCM5201_AUXMODE2_LOWPOWER		0x0008
+
+#define MII_BCM5201_MULTIPHY                    0x1E
+
+/* MII BCM5201 MULTIPHY register bits */
+#define MII_BCM5201_MULTIPHY_SERIALMODE         0x0002
+#define MII_BCM5201_MULTIPHY_SUPERISOLATE       0x0008
+
+/* MII BCM5221 Additional registers */
+#define MII_BCM5221_TEST			0x1f
+#define MII_BCM5221_TEST_ENABLE_SHADOWS		0x0080
+#define MII_BCM5221_SHDOW_AUX_STAT2		0x1b
+#define MII_BCM5221_SHDOW_AUX_STAT2_APD		0x0020
+#define MII_BCM5221_SHDOW_AUX_MODE4		0x1a
+#define MII_BCM5221_SHDOW_AUX_MODE4_IDDQMODE	0x0001
+#define MII_BCM5221_SHDOW_AUX_MODE4_CLKLOPWR	0x0004
+
+/* MII BCM5241 Additional registers */
+#define MII_BCM5241_SHDOW_AUX_MODE4_STANDBYPWR	0x0008
+
+/* MII BCM5400 1000-BASET Control register */
+#define MII_BCM5400_GB_CONTROL			0x09
+#define MII_BCM5400_GB_CONTROL_FULLDUPLEXCAP	0x0200
+
+/* MII BCM5400 AUXCONTROL register */
+#define MII_BCM5400_AUXCONTROL                  0x18
+#define MII_BCM5400_AUXCONTROL_PWR10BASET       0x0004
+
+/* MII BCM5400 AUXSTATUS register */
+#define MII_BCM5400_AUXSTATUS                   0x19
+#define MII_BCM5400_AUXSTATUS_LINKMODE_MASK     0x0700
+#define MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT    8
+
+/* 1000BT control (Marvell & BCM54xx at least) */
+#define MII_1000BASETCONTROL			0x09
+#define MII_1000BASETCONTROL_FULLDUPLEXCAP	0x0200
+#define MII_1000BASETCONTROL_HALFDUPLEXCAP	0x0100
+
+/* Marvell 88E1011 PHY control */
+#define MII_M1011_PHY_SPEC_CONTROL		0x10
+#define MII_M1011_PHY_SPEC_CONTROL_MANUAL_MDIX	0x20
+#define MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX	0x40
+
+/* Marvell 88E1011 PHY status */
+#define MII_M1011_PHY_SPEC_STATUS		0x11
+#define MII_M1011_PHY_SPEC_STATUS_1000		0x8000
+#define MII_M1011_PHY_SPEC_STATUS_100		0x4000
+#define MII_M1011_PHY_SPEC_STATUS_SPD_MASK	0xc000
+#define MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX	0x2000
+#define MII_M1011_PHY_SPEC_STATUS_RESOLVED	0x0800
+#define MII_M1011_PHY_SPEC_STATUS_TX_PAUSE	0x0008
+#define MII_M1011_PHY_SPEC_STATUS_RX_PAUSE	0x0004
+
+#endif /* __SUNGEM_PHY_H__ */
-- 
1.7.6


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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-08-15  5:20 Stephen Rothwell
  2011-08-15  5:56 ` David Miller
  0 siblings, 1 reply; 105+ messages in thread
From: Stephen Rothwell @ 2011-08-15  5:20 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: linux-next, linux-kernel, Jeff Kirsher

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

Hi Dave,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

make[5]: *** No rule to make target `drivers/net/ethernet/toshiba/ethernet/sun/sungem_phy.o', needed by `drivers/net/ethernet/toshiba/built-in.o'.
In file included from drivers/net/ethernet/toshiba/spider_net_ethtool.c:28:0:
drivers/net/ethernet/toshiba/spider_net.h:30:39: fatal error: ./ethernet/sun/sungem_phy.h: No such file or directory
In file included from drivers/net/ethernet/toshiba/spider_net.c:54:0:
drivers/net/ethernet/toshiba/spider_net.h:30:39: fatal error: ./ethernet/sun/sungem_phy.h: No such file or directory

Caused by commit 8df158ac36fa ("toshiba: Move the Toshiba drivers") or
the surrounding commits.

I have just left this failure for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-06-29  6:09     ` Stephen Rothwell
@ 2011-06-29  9:58       ` David Miller
  0 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2011-06-29  9:58 UTC (permalink / raw)
  To: sfr; +Cc: adobriyan, netdev, linux-next, linux-kernel

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 29 Jun 2011 16:09:01 +1000

> Again, this has taken some time to fix ...
> 
> Dave, I think you have raised my expectations too far ;-)

Sorry.  I try to give the offender time to fix the build failure
himself, but as you saw this time that didn't work out.

To be honest I'm going to be quite reluctant to apply these kinds of
header removal patches in the future if this is how responsive the
patch submitter is going to be to build fallout. :-/

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 29 Jun 2011 16:03:18 +1000
> Subject: [PATCH] net: include dma-mapping.h for dma_map_single etc
> 
> fixes thses build errors:
 ...
> Caused by commit commit b7f080cfe223 ("net: remove mm.h inclusion from
> netdevice.h").
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied, thanks!

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-06-29  6:01     ` Stephen Rothwell
  (?)
@ 2011-06-29  9:56     ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2011-06-29  9:56 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, adobriyan

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 29 Jun 2011 16:01:33 +1000

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 29 Jun 2011 15:52:00 +1000
> Subject: [PATCH] net: include io.h in for iounmap etc
> 
> fixes these build errors:
 ...
> Caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
> netdevice.h").
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-06-27  5:29   ` Stephen Rothwell
@ 2011-06-29  6:09     ` Stephen Rothwell
  2011-06-29  9:58       ` David Miller
  0 siblings, 1 reply; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-29  6:09 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: David Miller, netdev, linux-next, linux-kernel

Hi all,

On Mon, 27 Jun 2011 15:29:27 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 23 Jun 2011 16:04:13 +0300 Alexey Dobriyan <adobriyan@gmail.com> wrote:
> >
> > On Thu, Jun 23, 2011 at 8:29 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > After merging the final tree, today's linux-next build (powerpc
> > > allyesconfig) failed like this:
> > 
> > I build on all powerpc defconfigs, somehow this driver is not pinned
> > by any of them :^)
> 
> Well, yes, but an allmodconfig or allyesconfig build will get the error.
> 
> > > drivers/net/ll_temac_main.c:209:4: error: implicit declaration of function 'dma_unmap_single'
> 
> Is there a fix?

Again, this has taken some time to fix ...

Dave, I think you have raised my expectations too far ;-)

I have added the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 29 Jun 2011 16:03:18 +1000
Subject: [PATCH] net: include dma-mapping.h for dma_map_single etc

fixes thses build errors:

drivers/net/ll_temac_main.c: In function 'temac_dma_bd_release':
drivers/net/ll_temac_main.c:209:4: error: implicit declaration of function 'dma_unmap_single'
drivers/net/ll_temac_main.c:215:3: error: implicit declaration of function 'dma_free_coherent'
drivers/net/ll_temac_main.c: In function 'temac_dma_bd_init':
drivers/net/ll_temac_main.c:243:2: error: implicit declaration of function 'dma_alloc_coherent'
drivers/net/ll_temac_main.c:243:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:251:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:280:3: error: implicit declaration of function 'dma_map_single'
drivers/net/ll_temac_main.c: In function 'temac_start_xmit_done':
drivers/net/ll_temac_main.c:628:22: warning: cast to pointer from integer of different size

Caused by commit commit b7f080cfe223 ("net: remove mm.h inclusion from
netdevice.h").

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

diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index e3f1925..728fe41 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -49,6 +49,7 @@
 #include <linux/ip.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
+#include <linux/dma-mapping.h>
 
 #include "ll_temac.h"
 
-- 
1.7.5.4

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-06-27  5:35   ` Stephen Rothwell
@ 2011-06-29  6:01     ` Stephen Rothwell
  -1 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-29  6:01 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

Hi all,

On Mon, 27 Jun 2011 15:35:22 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 23 Jun 2011 15:25:35 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the final tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> > 
> > drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
> > drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
> > drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
> > drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
> > drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
> > drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
> > drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
> > drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
> > drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast
> > 
> > Since this file has not been changed recently, I suspect that this was
> > caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
> > netdevice.h").
> > 
> > I have left the build broken for now since it is also broken for other
> > reasons.
> 
> I am still getting these, is there a fix pending?

I have to wonder why this has taken so long to be fixed ...

I have applied this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 29 Jun 2011 15:52:00 +1000
Subject: [PATCH] net: include io.h in for iounmap etc

fixes these build errors:

drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast

Caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
netdevice.h").

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/can/sja1000/sja1000_of_platform.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c
index 9793df6..cee6ba2 100644
--- a/drivers/net/can/sja1000/sja1000_of_platform.c
+++ b/drivers/net/can/sja1000/sja1000_of_platform.c
@@ -38,6 +38,7 @@
 #include <linux/interrupt.h>
 #include <linux/netdevice.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 #include <linux/can/dev.h>
 
 #include <linux/of_platform.h>
-- 
1.7.5.4

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
@ 2011-06-29  6:01     ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-29  6:01 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

Hi all,

On Mon, 27 Jun 2011 15:35:22 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 23 Jun 2011 15:25:35 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the final tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> > 
> > drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
> > drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
> > drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
> > drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
> > drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
> > drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
> > drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
> > drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
> > drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast
> > 
> > Since this file has not been changed recently, I suspect that this was
> > caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
> > netdevice.h").
> > 
> > I have left the build broken for now since it is also broken for other
> > reasons.
> 
> I am still getting these, is there a fix pending?

I have to wonder why this has taken so long to be fixed ...

I have applied this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 29 Jun 2011 15:52:00 +1000
Subject: [PATCH] net: include io.h in for iounmap etc

fixes these build errors:

drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast

Caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
netdevice.h").

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/can/sja1000/sja1000_of_platform.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c
index 9793df6..cee6ba2 100644
--- a/drivers/net/can/sja1000/sja1000_of_platform.c
+++ b/drivers/net/can/sja1000/sja1000_of_platform.c
@@ -38,6 +38,7 @@
 #include <linux/interrupt.h>
 #include <linux/netdevice.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 #include <linux/can/dev.h>
 
 #include <linux/of_platform.h>
-- 
1.7.5.4

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-06-23  5:25 ` Stephen Rothwell
@ 2011-06-27  5:35   ` Stephen Rothwell
  -1 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-27  5:35 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

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

Hi all,

On Thu, 23 Jun 2011 15:25:35 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
> drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
> drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
> drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
> drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
> drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
> drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
> drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
> drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast
> 
> Since this file has not been changed recently, I suspect that this was
> caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
> netdevice.h").
> 
> I have left the build broken for now since it is also broken for other
> reasons.

I am still getting these, is there a fix pending?

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
@ 2011-06-27  5:35   ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-27  5:35 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

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

Hi all,

On Thu, 23 Jun 2011 15:25:35 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
> drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
> drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
> drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
> drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
> drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
> drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
> drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
> drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast
> 
> Since this file has not been changed recently, I suspect that this was
> caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
> netdevice.h").
> 
> I have left the build broken for now since it is also broken for other
> reasons.

I am still getting these, is there a fix pending?

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-06-23 13:04 ` Alexey Dobriyan
@ 2011-06-27  5:29   ` Stephen Rothwell
  2011-06-29  6:09     ` Stephen Rothwell
  0 siblings, 1 reply; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-27  5:29 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: David Miller, netdev, linux-next, linux-kernel

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

Hi Alexey,

On Thu, 23 Jun 2011 16:04:13 +0300 Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> On Thu, Jun 23, 2011 at 8:29 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > After merging the final tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> 
> I build on all powerpc defconfigs, somehow this driver is not pinned
> by any of them :^)

Well, yes, but an allmodconfig or allyesconfig build will get the error.

> 
> > drivers/net/ll_temac_main.c:209:4: error: implicit declaration of function 'dma_unmap_single'
> 

Is there a fix?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-06-23  5:29 ` Stephen Rothwell
  (?)
@ 2011-06-23 13:04 ` Alexey Dobriyan
  2011-06-27  5:29   ` Stephen Rothwell
  -1 siblings, 1 reply; 105+ messages in thread
From: Alexey Dobriyan @ 2011-06-23 13:04 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: David Miller, netdev, linux-next, linux-kernel

On Thu, Jun 23, 2011 at 8:29 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:

I build on all powerpc defconfigs, somehow this driver is not pinned
by any of them :^)

> drivers/net/ll_temac_main.c:209:4: error: implicit declaration of function 'dma_unmap_single'

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-06-23  5:29 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-23  5:29 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

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

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/ll_temac_main.c: In function 'temac_dma_bd_release':
drivers/net/ll_temac_main.c:209:4: error: implicit declaration of function 'dma_unmap_single'
drivers/net/ll_temac_main.c:215:3: error: implicit declaration of function 'dma_free_coherent'
drivers/net/ll_temac_main.c: In function 'temac_dma_bd_init':
drivers/net/ll_temac_main.c:243:2: error: implicit declaration of function 'dma_alloc_coherent'
drivers/net/ll_temac_main.c:243:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:251:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:280:3: error: implicit declaration of function 'dma_map_single'
drivers/net/ll_temac_main.c: In function 'temac_start_xmit_done':
drivers/net/ll_temac_main.c:628:22: warning: cast to pointer from integer of different size

I suspect that this was caused by commit b7f080cfe223 ("net: remove mm.h
inclusion from netdevice.h").

I have left the build broken for now since it is also broken for other
reasons.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-06-23  5:29 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-23  5:29 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

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

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/ll_temac_main.c: In function 'temac_dma_bd_release':
drivers/net/ll_temac_main.c:209:4: error: implicit declaration of function 'dma_unmap_single'
drivers/net/ll_temac_main.c:215:3: error: implicit declaration of function 'dma_free_coherent'
drivers/net/ll_temac_main.c: In function 'temac_dma_bd_init':
drivers/net/ll_temac_main.c:243:2: error: implicit declaration of function 'dma_alloc_coherent'
drivers/net/ll_temac_main.c:243:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:251:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:280:3: error: implicit declaration of function 'dma_map_single'
drivers/net/ll_temac_main.c: In function 'temac_start_xmit_done':
drivers/net/ll_temac_main.c:628:22: warning: cast to pointer from integer of different size

I suspect that this was caused by commit b7f080cfe223 ("net: remove mm.h
inclusion from netdevice.h").

I have left the build broken for now since it is also broken for other
reasons.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-06-23  5:25 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-23  5:25 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

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

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast

Since this file has not been changed recently, I suspect that this was
caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
netdevice.h").

I have left the build broken for now since it is also broken for other
reasons.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-06-23  5:25 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-23  5:25 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

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

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast

Since this file has not been changed recently, I suspect that this was
caused by commit b7f080cfe223 ("net: remove mm.h inclusion from
netdevice.h").

I have left the build broken for now since it is also broken for other
reasons.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-06-08  5:54 ` Stephen Rothwell
  (?)
@ 2011-06-08  7:16 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2011-06-08  7:16 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, adobriyan

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 8 Jun 2011 15:54:11 +1000

> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/net/ll_temac_main.c: In function 'temac_open':
> drivers/net/ll_temac_main.c:859:2: error: implicit declaration of function 'request_irq'
> drivers/net/ll_temac_main.c:870:2: error: implicit declaration of function 'free_irq'
> drivers/net/ll_temac_main.c: In function 'temac_poll_controller':
> drivers/net/ll_temac_main.c:903:2: error: implicit declaration of function 'disable_irq'
> drivers/net/ll_temac_main.c:909:2: error: implicit declaration of function 'enable_irq'

Oh well, I hit all the drivers I could with x86 and sparc64 builds.

> Probably caused by commit a6b7a407865a ("net: remove interrupt.h
> inclusion from netdevice.h").
> 
> I have added this patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 8 Jun 2011 15:49:33 +1000
> Subject: [PATCH] net: add needed interrupt.h

Applied, thanks Stephen.

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-06-08  5:54 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-08  5:54 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/ll_temac_main.c: In function 'temac_open':
drivers/net/ll_temac_main.c:859:2: error: implicit declaration of function 'request_irq'
drivers/net/ll_temac_main.c:870:2: error: implicit declaration of function 'free_irq'
drivers/net/ll_temac_main.c: In function 'temac_poll_controller':
drivers/net/ll_temac_main.c:903:2: error: implicit declaration of function 'disable_irq'
drivers/net/ll_temac_main.c:909:2: error: implicit declaration of function 'enable_irq'

Probably caused by commit a6b7a407865a ("net: remove interrupt.h
inclusion from netdevice.h").

I have added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 8 Jun 2011 15:49:33 +1000
Subject: [PATCH] net: add needed interrupt.h

Fixes these errors after the removal of interrupt.h from netdevice.h:

drivers/net/ll_temac_main.c: In function 'temac_open':
drivers/net/ll_temac_main.c:859:2: error: implicit declaration of function 'request_irq'
drivers/net/ll_temac_main.c:870:2: error: implicit declaration of function 'free_irq'
drivers/net/ll_temac_main.c: In function 'temac_poll_controller':
drivers/net/ll_temac_main.c:903:2: error: implicit declaration of function 'disable_irq'
drivers/net/ll_temac_main.c:909:2: error: implicit declaration of function 'enable_irq'

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

diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index b7948cc..e7b8afe 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -48,6 +48,7 @@
 #include <linux/io.h>
 #include <linux/ip.h>
 #include <linux/slab.h>
+#include <linux/interrupt.h>
 
 #include "ll_temac.h"
 
-- 
1.7.5.3

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-06-08  5:54 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-06-08  5:54 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Alexey Dobriyan

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/ll_temac_main.c: In function 'temac_open':
drivers/net/ll_temac_main.c:859:2: error: implicit declaration of function 'request_irq'
drivers/net/ll_temac_main.c:870:2: error: implicit declaration of function 'free_irq'
drivers/net/ll_temac_main.c: In function 'temac_poll_controller':
drivers/net/ll_temac_main.c:903:2: error: implicit declaration of function 'disable_irq'
drivers/net/ll_temac_main.c:909:2: error: implicit declaration of function 'enable_irq'

Probably caused by commit a6b7a407865a ("net: remove interrupt.h
inclusion from netdevice.h").

I have added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 8 Jun 2011 15:49:33 +1000
Subject: [PATCH] net: add needed interrupt.h

Fixes these errors after the removal of interrupt.h from netdevice.h:

drivers/net/ll_temac_main.c: In function 'temac_open':
drivers/net/ll_temac_main.c:859:2: error: implicit declaration of function 'request_irq'
drivers/net/ll_temac_main.c:870:2: error: implicit declaration of function 'free_irq'
drivers/net/ll_temac_main.c: In function 'temac_poll_controller':
drivers/net/ll_temac_main.c:903:2: error: implicit declaration of function 'disable_irq'
drivers/net/ll_temac_main.c:909:2: error: implicit declaration of function 'enable_irq'

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

diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index b7948cc..e7b8afe 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -48,6 +48,7 @@
 #include <linux/io.h>
 #include <linux/ip.h>
 #include <linux/slab.h>
+#include <linux/interrupt.h>
 
 #include "ll_temac.h"
 
-- 
1.7.5.3

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-04-21 22:10 ` Stephen Rothwell
  (?)
@ 2011-04-21 22:19 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2011-04-21 22:19 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, mirq-linux

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 22 Apr 2011 08:10:08 +1000

> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc chrp32_defconfig)
> failed like this:
> 
> drivers/net/mv643xx_eth.c: In function 'port_start':
> drivers/net/mv643xx_eth.c:2250: error: 'dev' undeclared (first use in this function)
> 
> Caused by commit aad59c431b77 ("net: mv643xx: convert to hw_features").

I just pushed the following fix, thanks!

--------------------
mv643xx_eth: Fix build regression.

>From Stephen Rothwell:

--------------------
After merging the final tree, today's linux-next build (powerpc chrp32_defconfig)
failed like this:

drivers/net/mv643xx_eth.c: In function 'port_start':
drivers/net/mv643xx_eth.c:2250: error: 'dev' undeclared (first use in this function)

Caused by commit aad59c431b77 ("net: mv643xx: convert to hw_features").
--------------------

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/mv643xx_eth.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 29605a3..57c2ac0 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -2247,7 +2247,7 @@ static void port_start(struct mv643xx_eth_private *mp)
 	 * frames to RX queue #0, and include the pseudo-header when
 	 * calculating receive checksums.
 	 */
-	mv643xx_eth_set_features(dev, dev->features);
+	mv643xx_eth_set_features(mp->dev, mp->dev->features);
 
 	/*
 	 * Treat BPDUs as normal multicasts, and disable partition mode.
-- 
1.7.4.3


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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-04-21 22:10 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-04-21 22:10 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, "Michał Mirosław"

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

Hi all,

After merging the final tree, today's linux-next build (powerpc chrp32_defconfig)
failed like this:

drivers/net/mv643xx_eth.c: In function 'port_start':
drivers/net/mv643xx_eth.c:2250: error: 'dev' undeclared (first use in this function)

Caused by commit aad59c431b77 ("net: mv643xx: convert to hw_features").

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

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-04-21 22:10 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-04-21 22:10 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, "Michał Mirosław"

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

Hi all,

After merging the final tree, today's linux-next build (powerpc chrp32_defconfig)
failed like this:

drivers/net/mv643xx_eth.c: In function 'port_start':
drivers/net/mv643xx_eth.c:2250: error: 'dev' undeclared (first use in this function)

Caused by commit aad59c431b77 ("net: mv643xx: convert to hw_features").

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-02-03  4:46 ` David Miller
@ 2011-02-03  5:14   ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-02-03  5:14 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-next, linux-kernel

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

Hi Dave,

On Wed, 02 Feb 2011 20:46:06 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>
> This problem has existed forever, you just have only been testing
> the build with fib_hash enabled instead of fib_trie.

All I have been doing (in this case) is a sparc32 defconfig ...

> I'll fix it up, thanks for the report.

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2011-02-03  4:13 ` Stephen Rothwell
  (?)
@ 2011-02-03  4:46 ` David Miller
  2011-02-03  5:14   ` Stephen Rothwell
  -1 siblings, 1 reply; 105+ messages in thread
From: David Miller @ 2011-02-03  4:46 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 3 Feb 2011 15:13:09 +1100

> Hi all,
> 
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
> 
> net/ipv4/fib_trie.c:98: error: redefinition of 'struct node'
> 
> Probably exposed by commit 3630b7c050d9c3564f143d595339fc06b888d6f3
> ("ipv4: Remove fib_hash").
> 
> Naming a struct "node" (in the face of include/linux/node.h) is a bit
> hopeful.  :-)
> 
> I have left this broken for now ...

This problem has existed forever, you just have only been testing
the build with fib_hash enabled instead of fib_trie.

I'm really surprised this has never been hit before. :-)

I'll fix it up, thanks for the report.


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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-02-03  4:13 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-02-03  4:13 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: linux-next, linux-kernel

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

Hi all,

After merging the final tree, today's linux-next build (sparc32 defconfig)
failed like this:

net/ipv4/fib_trie.c:98: error: redefinition of 'struct node'

Probably exposed by commit 3630b7c050d9c3564f143d595339fc06b888d6f3
("ipv4: Remove fib_hash").

Naming a struct "node" (in the face of include/linux/node.h) is a bit
hopeful.  :-)

I have left this broken for now ...
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2011-02-03  4:13 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2011-02-03  4:13 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: linux-next, linux-kernel

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

Hi all,

After merging the final tree, today's linux-next build (sparc32 defconfig)
failed like this:

net/ipv4/fib_trie.c:98: error: redefinition of 'struct node'

Probably exposed by commit 3630b7c050d9c3564f143d595339fc06b888d6f3
("ipv4: Remove fib_hash").

Naming a struct "node" (in the face of include/linux/node.h) is a bit
hopeful.  :-)

I have left this broken for now ...
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-11-15 16:52 ` David Miller
@ 2010-11-15 16:58   ` Eric Dumazet
  0 siblings, 0 replies; 105+ messages in thread
From: Eric Dumazet @ 2010-11-15 16:58 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, netdev, linux-next, linux-kernel

Le lundi 15 novembre 2010 à 08:52 -0800, David Miller a écrit :
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 15 Nov 2010 11:46:51 +1100
> 
> > Caused by commit 1d7138de878d1d4210727c1200193e69596f93b3 ("igmp: RCU
> > conversion of in_dev->mc_list").  The for_each_pmc_rtnl and
> > for_each_pmc_rcu definitions are protected by  CONFIG_IP_MULTICAST, but
> > the uses are not ...
> 
> Thanks for the report, I've pushed the following fix:
> 
> --------------------
> ipv4: Fix build with multicast disabled.
> 
> net/ipv4/igmp.c: In function 'ip_mc_inc_group':
> net/ipv4/igmp.c:1228: error: implicit declaration of function 'for_each_pmc_rtnl'
> net/ipv4/igmp.c:1228: error: expected ';' before '{' token
> net/ipv4/igmp.c: In function 'ip_mc_unmap':
> net/ipv4/igmp.c:1333: error: expected ';' before 'igmp_group_dropped'
>  ...
> 
> Move for_each_pmc_rcu and for_each_pmc_rtnl macro definitions
> outside of multicast ifdef protection.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>  

Oops thats right, sorry David, I missed this message.




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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-11-15  0:46 ` Stephen Rothwell
  (?)
@ 2010-11-15 16:52 ` David Miller
  2010-11-15 16:58   ` Eric Dumazet
  -1 siblings, 1 reply; 105+ messages in thread
From: David Miller @ 2010-11-15 16:52 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, eric.dumazet

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 15 Nov 2010 11:46:51 +1100

> Caused by commit 1d7138de878d1d4210727c1200193e69596f93b3 ("igmp: RCU
> conversion of in_dev->mc_list").  The for_each_pmc_rtnl and
> for_each_pmc_rcu definitions are protected by  CONFIG_IP_MULTICAST, but
> the uses are not ...

Thanks for the report, I've pushed the following fix:

--------------------
ipv4: Fix build with multicast disabled.

net/ipv4/igmp.c: In function 'ip_mc_inc_group':
net/ipv4/igmp.c:1228: error: implicit declaration of function 'for_each_pmc_rtnl'
net/ipv4/igmp.c:1228: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_unmap':
net/ipv4/igmp.c:1333: error: expected ';' before 'igmp_group_dropped'
 ...

Move for_each_pmc_rcu and for_each_pmc_rtnl macro definitions
outside of multicast ifdef protection.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ipv4/igmp.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 0f0e0f0..a1bf2f4 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -163,6 +163,16 @@ static void ip_ma_put(struct ip_mc_list *im)
 	}
 }
 
+#define for_each_pmc_rcu(in_dev, pmc)				\
+	for (pmc = rcu_dereference(in_dev->mc_list);		\
+	     pmc != NULL;					\
+	     pmc = rcu_dereference(pmc->next_rcu))
+
+#define for_each_pmc_rtnl(in_dev, pmc)				\
+	for (pmc = rtnl_dereference(in_dev->mc_list);		\
+	     pmc != NULL;					\
+	     pmc = rtnl_dereference(pmc->next_rcu))
+
 #ifdef CONFIG_IP_MULTICAST
 
 /*
@@ -502,16 +512,6 @@ empty_source:
 	return skb;
 }
 
-#define for_each_pmc_rcu(in_dev, pmc)				\
-	for (pmc = rcu_dereference(in_dev->mc_list);		\
-	     pmc != NULL;					\
-	     pmc = rcu_dereference(pmc->next_rcu))
-
-#define for_each_pmc_rtnl(in_dev, pmc)				\
-	for (pmc = rtnl_dereference(in_dev->mc_list);		\
-	     pmc != NULL;					\
-	     pmc = rtnl_dereference(pmc->next_rcu))
-
 static int igmpv3_send_report(struct in_device *in_dev, struct ip_mc_list *pmc)
 {
 	struct sk_buff *skb = NULL;
-- 
1.7.3.2


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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-11-15  0:46 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-11-15  0:46 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Eric Dumazet

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

Hi Dave,

After merging the final tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

net/ipv4/igmp.c: In function 'ip_mc_inc_group':
net/ipv4/igmp.c:1228: error: implicit declaration of function 'for_each_pmc_rtnl'
net/ipv4/igmp.c:1228: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_unmap':
net/ipv4/igmp.c:1333: error: expected ';' before 'igmp_group_dropped'
net/ipv4/igmp.c: In function 'ip_mc_remap':
net/ipv4/igmp.c:1343: error: expected ';' before 'igmp_group_added'
net/ipv4/igmp.c: In function 'ip_mc_down':
net/ipv4/igmp.c:1355: error: expected ';' before 'igmp_group_dropped'
net/ipv4/igmp.c: In function 'ip_mc_up':
net/ipv4/igmp.c:1400: error: expected ';' before 'igmp_group_added'
net/ipv4/igmp.c: In function 'ip_mc_del_src':
net/ipv4/igmp.c:1521: error: implicit declaration of function 'for_each_pmc_rcu'
net/ipv4/igmp.c:1521: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_add_src':
net/ipv4/igmp.c:1693: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_join_group':
net/ipv4/igmp.c:1800: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_source':
net/ipv4/igmp.c:1938: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_msfilter':
net/ipv4/igmp.c:2081: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_msfget':
net/ipv4/igmp.c:2159: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_gsfget':
net/ipv4/igmp.c:2212: error: expected ';' before '{' token
net/ipv4/igmp.c:2240: warning: label 'done' defined but not used
net/ipv4/igmp.c: In function 'ip_mc_sf_allow':
net/ipv4/igmp.c:2261: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_check_mc':
net/ipv4/igmp.c:2326: error: expected ';' before '{' token
net/ipv4/igmp.c:2322: warning: unused variable 'psf'

Caused by commit 1d7138de878d1d4210727c1200193e69596f93b3 ("igmp: RCU
conversion of in_dev->mc_list").  The for_each_pmc_rtnl and
for_each_pmc_rcu definitions are protected by  CONFIG_IP_MULTICAST, but
the uses are not ...

I have reverted that commit for today.

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

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-11-15  0:46 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-11-15  0:46 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Eric Dumazet

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

Hi Dave,

After merging the final tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

net/ipv4/igmp.c: In function 'ip_mc_inc_group':
net/ipv4/igmp.c:1228: error: implicit declaration of function 'for_each_pmc_rtnl'
net/ipv4/igmp.c:1228: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_unmap':
net/ipv4/igmp.c:1333: error: expected ';' before 'igmp_group_dropped'
net/ipv4/igmp.c: In function 'ip_mc_remap':
net/ipv4/igmp.c:1343: error: expected ';' before 'igmp_group_added'
net/ipv4/igmp.c: In function 'ip_mc_down':
net/ipv4/igmp.c:1355: error: expected ';' before 'igmp_group_dropped'
net/ipv4/igmp.c: In function 'ip_mc_up':
net/ipv4/igmp.c:1400: error: expected ';' before 'igmp_group_added'
net/ipv4/igmp.c: In function 'ip_mc_del_src':
net/ipv4/igmp.c:1521: error: implicit declaration of function 'for_each_pmc_rcu'
net/ipv4/igmp.c:1521: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_add_src':
net/ipv4/igmp.c:1693: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_join_group':
net/ipv4/igmp.c:1800: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_source':
net/ipv4/igmp.c:1938: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_msfilter':
net/ipv4/igmp.c:2081: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_msfget':
net/ipv4/igmp.c:2159: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_mc_gsfget':
net/ipv4/igmp.c:2212: error: expected ';' before '{' token
net/ipv4/igmp.c:2240: warning: label 'done' defined but not used
net/ipv4/igmp.c: In function 'ip_mc_sf_allow':
net/ipv4/igmp.c:2261: error: expected ';' before '{' token
net/ipv4/igmp.c: In function 'ip_check_mc':
net/ipv4/igmp.c:2326: error: expected ';' before '{' token
net/ipv4/igmp.c:2322: warning: unused variable 'psf'

Caused by commit 1d7138de878d1d4210727c1200193e69596f93b3 ("igmp: RCU
conversion of in_dev->mc_list").  The for_each_pmc_rtnl and
for_each_pmc_rcu definitions are protected by  CONFIG_IP_MULTICAST, but
the uses are not ...

I have reverted that commit for today.

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-10-18  7:36 ` Stephen Rothwell
  (?)
@ 2010-10-18  8:06 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2010-10-18  8:06 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, shemminger

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 18 Oct 2010 18:36:16 +1100

> net/tipc/core.c:249: error: __ksymtab_tipc_get_mode causes a section type conflict
> 
> Caused by commit 31e3c3f6f1f9b154981a0e6620df700463db30ee ("tipc: cleanup
> function namespace") which made the EXPORTed function tipc_get_mode() static.
> 
> I have reverted that commit for today.

Thanks I just pushed this fix:

--------------------
tipc: Kill tipc_get_mode() completely.

It's completely unused and exporting a static symbol
makes no sense and breaks the build.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/tipc/core.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/net/tipc/core.c b/net/tipc/core.c
index c005303..e2a09eb 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -96,11 +96,6 @@ int tipc_net_id;
 int tipc_remote_management;
 
 
-static int tipc_get_mode(void)
-{
-	return tipc_mode;
-}
-
 /**
  * tipc_buf_acquire - creates a TIPC message buffer
  * @size: message size (including TIPC header)
@@ -246,7 +241,6 @@ MODULE_VERSION(TIPC_MOD_VER);
 
 EXPORT_SYMBOL(tipc_attach);
 EXPORT_SYMBOL(tipc_detach);
-EXPORT_SYMBOL(tipc_get_mode);
 EXPORT_SYMBOL(tipc_createport);
 EXPORT_SYMBOL(tipc_deleteport);
 EXPORT_SYMBOL(tipc_ownidentity);
-- 
1.7.3.1


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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-10-18  7:36 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-10-18  7:36 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, stephen hemminger

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

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

net/tipc/core.c:249: error: __ksymtab_tipc_get_mode causes a section type conflict

Caused by commit 31e3c3f6f1f9b154981a0e6620df700463db30ee ("tipc: cleanup
function namespace") which made the EXPORTed function tipc_get_mode() static.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-10-18  7:36 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-10-18  7:36 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, stephen hemminger

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

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

net/tipc/core.c:249: error: __ksymtab_tipc_get_mode causes a section type conflict

Caused by commit 31e3c3f6f1f9b154981a0e6620df700463db30ee ("tipc: cleanup
function namespace") which made the EXPORTed function tipc_get_mode() static.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27 19:44                   ` John W. Linville
  (?)
@ 2010-09-27 20:18                   ` Ohad Ben-Cohen
  -1 siblings, 0 replies; 105+ messages in thread
From: Ohad Ben-Cohen @ 2010-09-27 20:18 UTC (permalink / raw)
  To: John W. Linville; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On Mon, Sep 27, 2010 at 9:44 PM, John W. Linville
<linville@tuxdriver.com> wrote:
>> On Mon, Sep 27, 2010 at 9:01 PM, Ohad Ben-Cohen <ohad@wizery.com> wrote:
>> >> CONFIG_MACH_OMAP_ZOOM2=y
>> >> CONFIG_WL12XX_PLATFORM_DATA=n
>>
>> That's a good point (it's a separate issue); we need to have a select there.
>>
>> I'll send a patch.
>
> No, maybe you don't need it -- the bool line by itself means there
> is no menu item.  So the default y does the job of selecting it all
> the time (which kinda sucks for non-OMAP)...

The default y will kick in only if WL1271_SDIO is selected:

>> > config WL12XX_PLATFORM_DATA
>> >        bool
>> >        depends on WL1271_SDIO != n
>> >        default y

But if we don't select this driver at all, we better have something like:

diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h
index 95deae3..51e4ba9 100644
--- a/include/linux/wl12xx.h
+++ b/include/linux/wl12xx.h
@@ -32,7 +32,20 @@ struct wl12xx_platform_data {
 	int board_ref_clock;
 };

+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+
 int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
+
+#else
+
+static inline int wl12xx_set_platform_data(const struct
+						wl12xx_platform_data *data)
+{
+	return -ENOSYS;
+}
+
+#endif
+
 const struct wl12xx_platform_data *wl12xx_get_platform_data(void);

 #endif

It's better than forcing a select - if we don't need the driver, we
don't need this piece of code too.

I'll give this a spin tomorrow and send it over nicely.

> Can't we do this?  It seems to work (i.e. the symbols from
> wl12xx_platform_data.o end-up in built-in.o).

Yes, this one looks good !

Thanks a lot, John.


>
> From d8ddd0ebe8ae3791ba9c76a506bfcdd60be40f5b Mon Sep 17 00:00:00 2001
> From: John W. Linville <linville@tuxdriver.com>
> Date: Mon, 27 Sep 2010 14:00:51 -0400
> Subject: [PATCH] wl12xx: fix separate-object-folder builds
>
> Make this go away (happens when building with a separate object
> directory):
>
> Assembler messages:
> Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
> ---
>  drivers/net/wireless/Makefile        |    3 +--
>  drivers/net/wireless/wl12xx/Makefile |    3 +++
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
> index 85af697..a13a602 100644
> --- a/drivers/net/wireless/Makefile
> +++ b/drivers/net/wireless/Makefile
> @@ -50,7 +50,6 @@ obj-$(CONFIG_ATH_COMMON)      += ath/
>  obj-$(CONFIG_MAC80211_HWSIM)   += mac80211_hwsim.o
>
>  obj-$(CONFIG_WL12XX)   += wl12xx/
> -# small builtin driver bit
> -obj-$(CONFIG_WL12XX_PLATFORM_DATA)     += wl12xx/wl12xx_platform_data.o
> +obj-$(CONFIG_WL12XX_PLATFORM_DATA)     += wl12xx/
>
>  obj-$(CONFIG_IWM)      += iwmc3200wifi/
> diff --git a/drivers/net/wireless/wl12xx/Makefile b/drivers/net/wireless/wl12xx/Makefile
> index 078b439..0d334d6 100644
> --- a/drivers/net/wireless/wl12xx/Makefile
> +++ b/drivers/net/wireless/wl12xx/Makefile
> @@ -16,3 +16,6 @@ wl1271-$(CONFIG_NL80211_TESTMODE)     += wl1271_testmode.o
>  obj-$(CONFIG_WL1271)   += wl1271.o
>  obj-$(CONFIG_WL1271_SPI)       += wl1271_spi.o
>  obj-$(CONFIG_WL1271_SDIO)      += wl1271_sdio.o
> +
> +# small builtin driver bit
> +obj-$(CONFIG_WL12XX_PLATFORM_DATA)     += wl12xx_platform_data.o
> --
> 1.7.2.3
>
>
> --
> John W. Linville                Someday the world will need a hero, and you
> linville@tuxdriver.com                  might be all we have.  Be ready.
>

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27 19:06               ` Ohad Ben-Cohen
@ 2010-09-27 19:44                   ` John W. Linville
  0 siblings, 0 replies; 105+ messages in thread
From: John W. Linville @ 2010-09-27 19:44 UTC (permalink / raw)
  To: Ohad Ben-Cohen; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On Mon, Sep 27, 2010 at 09:06:09PM +0200, Ohad Ben-Cohen wrote:
> On Mon, Sep 27, 2010 at 9:01 PM, Ohad Ben-Cohen <ohad@wizery.com> wrote:
> > On Mon, Sep 27, 2010 at 8:44 PM, John W. Linville
> > <linville@tuxdriver.com> wrote:
> >> On Mon, Sep 27, 2010 at 08:38:50PM +0200, Ohad Ben-Cohen wrote:
> >>> On Mon, Sep 27, 2010 at 8:25 PM, John W. Linville
> >>> <linville@tuxdriver.com> wrote:
> >>> >> BTW, if this fuglet going to work if the driver is built modular?
> >>> >>
> >>> >> The idea of this things seems to be to allow arch platform code to call
> >>> >> into it to set things.  Such calls from arch platform code are going
> >>> >> to be "obj-y"
> >>> >>
> >>> >> So if this is built into the modular driver, I can't see how it
> >>> >> can work.
> >>> >
> >>> > Dave is right -- these Kconfig dependencies (or lack thereof) seem
> >>> > to be wrong.
> >>>
> >>> This is why I had to put it in drivers/net/wireless/Makefile (in both
> >>> the original patch and in the fix I sent earlier) and not in
> >>> drivers/net/wireless/wl12xx/Makefile (as it was in the fix that Dave
> >>> was referring to).
> >>>
> >>> This way it works with a modular driver.
> >>
> >> That doesn't seem very helpful if someone selects
> >>
> >> CONFIG_MACH_OMAP_ZOOM2=y
> >> CONFIG_WL12XX_PLATFORM_DATA=n
> 
> 
> That's a good point (it's a separate issue); we need to have a select there.
> 
> I'll send a patch.

No, maybe you don't need it -- the bool line by itself means there
is no menu item.  So the default y does the job of selecting it all
the time (which kinda sucks for non-OMAP)...

> >>
> >
> > CONFIG_WL12XX_PLATFORM_DATA is selected automatically if the relevant
> > driver is selected (this is independent of the underlying arch/board):
> >
> > config WL12XX_PLATFORM_DATA
> >        bool
> >        depends on WL1271_SDIO != n
> >        default y
> >
> > All we have to make sure is that it will be compiled built-in. If we
> > use drivers/net/wireless/wl12xx/Makefile, and we build a modular
> > wl1271_sdio, it won't (despite it being selected as y).

I don't understand this part.  FWIW, Kconfig is not a strength for me.
But...

> > That's why I put it in drivers/net/wireless/Makefile.

Can't we do this?  It seems to work (i.e. the symbols from
wl12xx_platform_data.o end-up in built-in.o).

>From d8ddd0ebe8ae3791ba9c76a506bfcdd60be40f5b Mon Sep 17 00:00:00 2001
From: John W. Linville <linville@tuxdriver.com>
Date: Mon, 27 Sep 2010 14:00:51 -0400
Subject: [PATCH] wl12xx: fix separate-object-folder builds

Make this go away (happens when building with a separate object
directory):

Assembler messages:
Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
 drivers/net/wireless/Makefile        |    3 +--
 drivers/net/wireless/wl12xx/Makefile |    3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 85af697..a13a602 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -50,7 +50,6 @@ obj-$(CONFIG_ATH_COMMON)	+= ath/
 obj-$(CONFIG_MAC80211_HWSIM)	+= mac80211_hwsim.o
 
 obj-$(CONFIG_WL12XX)	+= wl12xx/
-# small builtin driver bit
-obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx/wl12xx_platform_data.o
+obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx/
 
 obj-$(CONFIG_IWM)	+= iwmc3200wifi/
diff --git a/drivers/net/wireless/wl12xx/Makefile b/drivers/net/wireless/wl12xx/Makefile
index 078b439..0d334d6 100644
--- a/drivers/net/wireless/wl12xx/Makefile
+++ b/drivers/net/wireless/wl12xx/Makefile
@@ -16,3 +16,6 @@ wl1271-$(CONFIG_NL80211_TESTMODE)	+= wl1271_testmode.o
 obj-$(CONFIG_WL1271)	+= wl1271.o
 obj-$(CONFIG_WL1271_SPI)	+= wl1271_spi.o
 obj-$(CONFIG_WL1271_SDIO)	+= wl1271_sdio.o
+
+# small builtin driver bit
+obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx_platform_data.o
-- 
1.7.2.3


-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
@ 2010-09-27 19:44                   ` John W. Linville
  0 siblings, 0 replies; 105+ messages in thread
From: John W. Linville @ 2010-09-27 19:44 UTC (permalink / raw)
  To: Ohad Ben-Cohen; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On Mon, Sep 27, 2010 at 09:06:09PM +0200, Ohad Ben-Cohen wrote:
> On Mon, Sep 27, 2010 at 9:01 PM, Ohad Ben-Cohen <ohad@wizery.com> wrote:
> > On Mon, Sep 27, 2010 at 8:44 PM, John W. Linville
> > <linville@tuxdriver.com> wrote:
> >> On Mon, Sep 27, 2010 at 08:38:50PM +0200, Ohad Ben-Cohen wrote:
> >>> On Mon, Sep 27, 2010 at 8:25 PM, John W. Linville
> >>> <linville@tuxdriver.com> wrote:
> >>> >> BTW, if this fuglet going to work if the driver is built modular?
> >>> >>
> >>> >> The idea of this things seems to be to allow arch platform code to call
> >>> >> into it to set things.  Such calls from arch platform code are going
> >>> >> to be "obj-y"
> >>> >>
> >>> >> So if this is built into the modular driver, I can't see how it
> >>> >> can work.
> >>> >
> >>> > Dave is right -- these Kconfig dependencies (or lack thereof) seem
> >>> > to be wrong.
> >>>
> >>> This is why I had to put it in drivers/net/wireless/Makefile (in both
> >>> the original patch and in the fix I sent earlier) and not in
> >>> drivers/net/wireless/wl12xx/Makefile (as it was in the fix that Dave
> >>> was referring to).
> >>>
> >>> This way it works with a modular driver.
> >>
> >> That doesn't seem very helpful if someone selects
> >>
> >> CONFIG_MACH_OMAP_ZOOM2=y
> >> CONFIG_WL12XX_PLATFORM_DATA=n
> 
> 
> That's a good point (it's a separate issue); we need to have a select there.
> 
> I'll send a patch.

No, maybe you don't need it -- the bool line by itself means there
is no menu item.  So the default y does the job of selecting it all
the time (which kinda sucks for non-OMAP)...

> >>
> >
> > CONFIG_WL12XX_PLATFORM_DATA is selected automatically if the relevant
> > driver is selected (this is independent of the underlying arch/board):
> >
> > config WL12XX_PLATFORM_DATA
> >        bool
> >        depends on WL1271_SDIO != n
> >        default y
> >
> > All we have to make sure is that it will be compiled built-in. If we
> > use drivers/net/wireless/wl12xx/Makefile, and we build a modular
> > wl1271_sdio, it won't (despite it being selected as y).

I don't understand this part.  FWIW, Kconfig is not a strength for me.
But...

> > That's why I put it in drivers/net/wireless/Makefile.

Can't we do this?  It seems to work (i.e. the symbols from
wl12xx_platform_data.o end-up in built-in.o).

From d8ddd0ebe8ae3791ba9c76a506bfcdd60be40f5b Mon Sep 17 00:00:00 2001
From: John W. Linville <linville@tuxdriver.com>
Date: Mon, 27 Sep 2010 14:00:51 -0400
Subject: [PATCH] wl12xx: fix separate-object-folder builds

Make this go away (happens when building with a separate object
directory):

Assembler messages:
Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
 drivers/net/wireless/Makefile        |    3 +--
 drivers/net/wireless/wl12xx/Makefile |    3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 85af697..a13a602 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -50,7 +50,6 @@ obj-$(CONFIG_ATH_COMMON)	+= ath/
 obj-$(CONFIG_MAC80211_HWSIM)	+= mac80211_hwsim.o
 
 obj-$(CONFIG_WL12XX)	+= wl12xx/
-# small builtin driver bit
-obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx/wl12xx_platform_data.o
+obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx/
 
 obj-$(CONFIG_IWM)	+= iwmc3200wifi/
diff --git a/drivers/net/wireless/wl12xx/Makefile b/drivers/net/wireless/wl12xx/Makefile
index 078b439..0d334d6 100644
--- a/drivers/net/wireless/wl12xx/Makefile
+++ b/drivers/net/wireless/wl12xx/Makefile
@@ -16,3 +16,6 @@ wl1271-$(CONFIG_NL80211_TESTMODE)	+= wl1271_testmode.o
 obj-$(CONFIG_WL1271)	+= wl1271.o
 obj-$(CONFIG_WL1271_SPI)	+= wl1271_spi.o
 obj-$(CONFIG_WL1271_SDIO)	+= wl1271_sdio.o
+
+# small builtin driver bit
+obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx_platform_data.o
-- 
1.7.2.3


-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27 19:01             ` Ohad Ben-Cohen
@ 2010-09-27 19:06               ` Ohad Ben-Cohen
  2010-09-27 19:44                   ` John W. Linville
  0 siblings, 1 reply; 105+ messages in thread
From: Ohad Ben-Cohen @ 2010-09-27 19:06 UTC (permalink / raw)
  To: John W. Linville; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On Mon, Sep 27, 2010 at 9:01 PM, Ohad Ben-Cohen <ohad@wizery.com> wrote:
> On Mon, Sep 27, 2010 at 8:44 PM, John W. Linville
> <linville@tuxdriver.com> wrote:
>> On Mon, Sep 27, 2010 at 08:38:50PM +0200, Ohad Ben-Cohen wrote:
>>> On Mon, Sep 27, 2010 at 8:25 PM, John W. Linville
>>> <linville@tuxdriver.com> wrote:
>>> >> BTW, if this fuglet going to work if the driver is built modular?
>>> >>
>>> >> The idea of this things seems to be to allow arch platform code to call
>>> >> into it to set things.  Such calls from arch platform code are going
>>> >> to be "obj-y"
>>> >>
>>> >> So if this is built into the modular driver, I can't see how it
>>> >> can work.
>>> >
>>> > Dave is right -- these Kconfig dependencies (or lack thereof) seem
>>> > to be wrong.
>>>
>>> This is why I had to put it in drivers/net/wireless/Makefile (in both
>>> the original patch and in the fix I sent earlier) and not in
>>> drivers/net/wireless/wl12xx/Makefile (as it was in the fix that Dave
>>> was referring to).
>>>
>>> This way it works with a modular driver.
>>
>> That doesn't seem very helpful if someone selects
>>
>> CONFIG_MACH_OMAP_ZOOM2=y
>> CONFIG_WL12XX_PLATFORM_DATA=n


That's a good point (it's a separate issue); we need to have a select there.

I'll send a patch.

>>
>
> CONFIG_WL12XX_PLATFORM_DATA is selected automatically if the relevant
> driver is selected (this is independent of the underlying arch/board):
>
> config WL12XX_PLATFORM_DATA
>        bool
>        depends on WL1271_SDIO != n
>        default y
>
> All we have to make sure is that it will be compiled built-in. If we
> use drivers/net/wireless/wl12xx/Makefile, and we build a modular
> wl1271_sdio, it won't (despite it being selected as y).
>
> That's why I put it in drivers/net/wireless/Makefile.
>
> In the original patch I put the code itself in
> drivers/net/wireless/wl12xx to make it look nicer, but as Stephen
> reported that seem to break building with a separate object folder...
>
> So the fix I sent just moves that builtin code to
> drivers/net/wireless. This maintains the builtin property even if the
> driver is modular, and fixes the issue reported by Stephen.
>
> Please tell me if you have any thoughts/suggestions.
>
> Thanks,
> Ohad.
>
>> or am I missing something?
>>
>> John
>> --
>> John W. Linville                Someday the world will need a hero, and you
>> linville@tuxdriver.com                  might be all we have.  Be ready.
>>
>

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27 18:44           ` John W. Linville
@ 2010-09-27 19:01             ` Ohad Ben-Cohen
  2010-09-27 19:06               ` Ohad Ben-Cohen
  0 siblings, 1 reply; 105+ messages in thread
From: Ohad Ben-Cohen @ 2010-09-27 19:01 UTC (permalink / raw)
  To: John W. Linville; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On Mon, Sep 27, 2010 at 8:44 PM, John W. Linville
<linville@tuxdriver.com> wrote:
> On Mon, Sep 27, 2010 at 08:38:50PM +0200, Ohad Ben-Cohen wrote:
>> On Mon, Sep 27, 2010 at 8:25 PM, John W. Linville
>> <linville@tuxdriver.com> wrote:
>> >> BTW, if this fuglet going to work if the driver is built modular?
>> >>
>> >> The idea of this things seems to be to allow arch platform code to call
>> >> into it to set things.  Such calls from arch platform code are going
>> >> to be "obj-y"
>> >>
>> >> So if this is built into the modular driver, I can't see how it
>> >> can work.
>> >
>> > Dave is right -- these Kconfig dependencies (or lack thereof) seem
>> > to be wrong.
>>
>> This is why I had to put it in drivers/net/wireless/Makefile (in both
>> the original patch and in the fix I sent earlier) and not in
>> drivers/net/wireless/wl12xx/Makefile (as it was in the fix that Dave
>> was referring to).
>>
>> This way it works with a modular driver.
>
> That doesn't seem very helpful if someone selects
>
> CONFIG_MACH_OMAP_ZOOM2=y
> CONFIG_WL12XX_PLATFORM_DATA=n
>

CONFIG_WL12XX_PLATFORM_DATA is selected automatically if the relevant
driver is selected (this is independent of the underlying arch/board):

config WL12XX_PLATFORM_DATA
        bool
        depends on WL1271_SDIO != n
        default y

All we have to make sure is that it will be compiled built-in. If we
use drivers/net/wireless/wl12xx/Makefile, and we build a modular
wl1271_sdio, it won't (despite it being selected as y).

That's why I put it in drivers/net/wireless/Makefile.

In the original patch I put the code itself in
drivers/net/wireless/wl12xx to make it look nicer, but as Stephen
reported that seem to break building with a separate object folder...

So the fix I sent just moves that builtin code to
drivers/net/wireless. This maintains the builtin property even if the
driver is modular, and fixes the issue reported by Stephen.

Please tell me if you have any thoughts/suggestions.

Thanks,
Ohad.

> or am I missing something?
>
> John
> --
> John W. Linville                Someday the world will need a hero, and you
> linville@tuxdriver.com                  might be all we have.  Be ready.
>

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27 18:38         ` Ohad Ben-Cohen
@ 2010-09-27 18:44           ` John W. Linville
  2010-09-27 19:01             ` Ohad Ben-Cohen
  0 siblings, 1 reply; 105+ messages in thread
From: John W. Linville @ 2010-09-27 18:44 UTC (permalink / raw)
  To: Ohad Ben-Cohen; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On Mon, Sep 27, 2010 at 08:38:50PM +0200, Ohad Ben-Cohen wrote:
> On Mon, Sep 27, 2010 at 8:25 PM, John W. Linville
> <linville@tuxdriver.com> wrote:
> >> BTW, if this fuglet going to work if the driver is built modular?
> >>
> >> The idea of this things seems to be to allow arch platform code to call
> >> into it to set things.  Such calls from arch platform code are going
> >> to be "obj-y"
> >>
> >> So if this is built into the modular driver, I can't see how it
> >> can work.
> >
> > Dave is right -- these Kconfig dependencies (or lack thereof) seem
> > to be wrong.
> 
> This is why I had to put it in drivers/net/wireless/Makefile (in both
> the original patch and in the fix I sent earlier) and not in
> drivers/net/wireless/wl12xx/Makefile (as it was in the fix that Dave
> was referring to).
> 
> This way it works with a modular driver.

That doesn't seem very helpful if someone selects

CONFIG_MACH_OMAP_ZOOM2=y
CONFIG_WL12XX_PLATFORM_DATA=n

or am I missing something?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27 18:25       ` John W. Linville
@ 2010-09-27 18:38         ` Ohad Ben-Cohen
  2010-09-27 18:44           ` John W. Linville
  0 siblings, 1 reply; 105+ messages in thread
From: Ohad Ben-Cohen @ 2010-09-27 18:38 UTC (permalink / raw)
  To: John W. Linville; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On Mon, Sep 27, 2010 at 8:25 PM, John W. Linville
<linville@tuxdriver.com> wrote:
>> BTW, if this fuglet going to work if the driver is built modular?
>>
>> The idea of this things seems to be to allow arch platform code to call
>> into it to set things.  Such calls from arch platform code are going
>> to be "obj-y"
>>
>> So if this is built into the modular driver, I can't see how it
>> can work.
>
> Dave is right -- these Kconfig dependencies (or lack thereof) seem
> to be wrong.

This is why I had to put it in drivers/net/wireless/Makefile (in both
the original patch and in the fix I sent earlier) and not in
drivers/net/wireless/wl12xx/Makefile (as it was in the fix that Dave
was referring to).

This way it works with a modular driver.


>  Seems like the OMAP code needs to select the option
> for this code?
>
> John
> --
> John W. Linville                Someday the world will need a hero, and you
> linville@tuxdriver.com                  might be all we have.  Be ready.
>

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27 18:18     ` David Miller
@ 2010-09-27 18:25       ` John W. Linville
  2010-09-27 18:38         ` Ohad Ben-Cohen
  0 siblings, 1 reply; 105+ messages in thread
From: John W. Linville @ 2010-09-27 18:25 UTC (permalink / raw)
  To: David Miller; +Cc: ohad, sfr, netdev, linux-next, linux-kernel

On Mon, Sep 27, 2010 at 11:18:18AM -0700, David Miller wrote:
> From: "John W. Linville" <linville@tuxdriver.com>
> Date: Mon, 27 Sep 2010 14:04:12 -0400
> 
> > Subject: [PATCH] wl12xx: fix separate-object-folder builds
> > 
> > Make this go away (happens when building with a separate object
> > directory):
> > 
> > Assembler messages:
> > Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
> > drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
> > drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
> > drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out
> > 
> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> 
> BTW, if this fuglet going to work if the driver is built modular?
> 
> The idea of this things seems to be to allow arch platform code to call
> into it to set things.  Such calls from arch platform code are going
> to be "obj-y"
> 
> So if this is built into the modular driver, I can't see how it
> can work.

Dave is right -- these Kconfig dependencies (or lack thereof) seem
to be wrong.  Seems like the OMAP code needs to select the option
for this code?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27 18:04   ` John W. Linville
@ 2010-09-27 18:18     ` David Miller
  2010-09-27 18:25       ` John W. Linville
  0 siblings, 1 reply; 105+ messages in thread
From: David Miller @ 2010-09-27 18:18 UTC (permalink / raw)
  To: linville; +Cc: ohad, sfr, netdev, linux-next, linux-kernel

From: "John W. Linville" <linville@tuxdriver.com>
Date: Mon, 27 Sep 2010 14:04:12 -0400

> Subject: [PATCH] wl12xx: fix separate-object-folder builds
> 
> Make this go away (happens when building with a separate object
> directory):
> 
> Assembler messages:
> Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out
> 
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>

BTW, if this fuglet going to work if the driver is built modular?

The idea of this things seems to be to allow arch platform code to call
into it to set things.  Such calls from arch platform code are going
to be "obj-y"

So if this is built into the modular driver, I can't see how it
can work.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27 15:55   ` Ohad Ben-Cohen
  (?)
@ 2010-09-27 18:04   ` John W. Linville
  2010-09-27 18:18     ` David Miller
  -1 siblings, 1 reply; 105+ messages in thread
From: John W. Linville @ 2010-09-27 18:04 UTC (permalink / raw)
  To: Ohad Ben-Cohen
  Cc: Stephen Rothwell, David Miller, netdev, linux-next, linux-kernel

On Mon, Sep 27, 2010 at 05:55:42PM +0200, Ohad Ben-Cohen wrote:
> On Mon, Sep 27, 2010 at 7:44 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > Assembler messages:
> > Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
> > drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
> > drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
> > drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out
> >
> > Presumably caused by commit 61ee7007a5d61aa066076da578e8e8084e122d7d
> > ("wl12xx: add platform data passing support").
> >
> > I do my builds with a separate object directory (which may be a reason
> > you don't see this).
> 
> Thank you, Stephen.
> 
> I have just tried building with a separate object directory, and I was
> then able to reproduce it and fix it with:
> 
> From fb0d1dc5ce6c258b3ecb0a8997791a77be3c5307 Mon Sep 17 00:00:00 2001
> From: Ohad Ben-Cohen <ohad@wizery.com>
> Date: Mon, 27 Sep 2010 17:33:57 +0200
> Subject: [PATCH] wl12xx: fix separate-object-folder builds
> 
> Make this go away (happens when building with a separate object directory):
> 
> Assembler messages:
> Fatal error: can't create
> drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file
> or directory
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function
> 'wl12xx_get_platform_data':
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot
> open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by
> earlier errors, bailing out
> 
> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
> ---
>  drivers/net/wireless/Makefile                      |    2 +-
>  .../wireless/{wl12xx => }/wl12xx_platform_data.c   |    0
>  2 files changed, 1 insertions(+), 1 deletions(-)
>  rename drivers/net/wireless/{wl12xx => }/wl12xx_platform_data.c (100%)
> 
> diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
> index 85af697..0a64bd5 100644
> --- a/drivers/net/wireless/Makefile
> +++ b/drivers/net/wireless/Makefile
> @@ -51,6 +51,6 @@ obj-$(CONFIG_MAC80211_HWSIM)	+= mac80211_hwsim.o
> 
>  obj-$(CONFIG_WL12XX)	+= wl12xx/
>  # small builtin driver bit
> -obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx/wl12xx_platform_data.o
> +obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx_platform_data.o
> 
>  obj-$(CONFIG_IWM)	+= iwmc3200wifi/
> diff --git a/drivers/net/wireless/wl12xx/wl12xx_platform_data.c
> b/drivers/net/wireless/wl12xx_platform_data.c
> similarity index 100%
> rename from drivers/net/wireless/wl12xx/wl12xx_platform_data.c
> rename to drivers/net/wireless/wl12xx_platform_data.c

I like this version better, since it keeps the platform data with
the rest of the code:

>From f8ac84505927d0a1fd79994cefaad7abf9b2e693 Mon Sep 17 00:00:00 2001
From: John W. Linville <linville@tuxdriver.com>
Date: Mon, 27 Sep 2010 14:00:51 -0400
Subject: [PATCH] wl12xx: fix separate-object-folder builds

Make this go away (happens when building with a separate object
directory):

Assembler messages:
Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
 drivers/net/wireless/Makefile        |    2 --
 drivers/net/wireless/wl12xx/Makefile |    3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 85af697..5d4ce4d 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -50,7 +50,5 @@ obj-$(CONFIG_ATH_COMMON)	+= ath/
 obj-$(CONFIG_MAC80211_HWSIM)	+= mac80211_hwsim.o
 
 obj-$(CONFIG_WL12XX)	+= wl12xx/
-# small builtin driver bit
-obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx/wl12xx_platform_data.o
 
 obj-$(CONFIG_IWM)	+= iwmc3200wifi/
diff --git a/drivers/net/wireless/wl12xx/Makefile b/drivers/net/wireless/wl12xx/Makefile
index 078b439..0d334d6 100644
--- a/drivers/net/wireless/wl12xx/Makefile
+++ b/drivers/net/wireless/wl12xx/Makefile
@@ -16,3 +16,6 @@ wl1271-$(CONFIG_NL80211_TESTMODE)	+= wl1271_testmode.o
 obj-$(CONFIG_WL1271)	+= wl1271.o
 obj-$(CONFIG_WL1271_SPI)	+= wl1271_spi.o
 obj-$(CONFIG_WL1271_SDIO)	+= wl1271_sdio.o
+
+# small builtin driver bit
+obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx_platform_data.o
-- 
1.7.2.3


-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27  5:44 ` Stephen Rothwell
@ 2010-09-27 15:55   ` Ohad Ben-Cohen
  -1 siblings, 0 replies; 105+ messages in thread
From: Ohad Ben-Cohen @ 2010-09-27 15:55 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, netdev, linux-next, linux-kernel, John W. Linville

On Mon, Sep 27, 2010 at 7:44 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Assembler messages:
> Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out
>
> Presumably caused by commit 61ee7007a5d61aa066076da578e8e8084e122d7d
> ("wl12xx: add platform data passing support").
>
> I do my builds with a separate object directory (which may be a reason
> you don't see this).

Thank you, Stephen.

I have just tried building with a separate object directory, and I was
then able to reproduce it and fix it with:

>From fb0d1dc5ce6c258b3ecb0a8997791a77be3c5307 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Mon, 27 Sep 2010 17:33:57 +0200
Subject: [PATCH] wl12xx: fix separate-object-folder builds

Make this go away (happens when building with a separate object directory):

Assembler messages:
Fatal error: can't create
drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file
or directory
drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function
'wl12xx_get_platform_data':
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot
open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by
earlier errors, bailing out

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
 drivers/net/wireless/Makefile                      |    2 +-
 .../wireless/{wl12xx => }/wl12xx_platform_data.c   |    0
 2 files changed, 1 insertions(+), 1 deletions(-)
 rename drivers/net/wireless/{wl12xx => }/wl12xx_platform_data.c (100%)

diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 85af697..0a64bd5 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -51,6 +51,6 @@ obj-$(CONFIG_MAC80211_HWSIM)	+= mac80211_hwsim.o

 obj-$(CONFIG_WL12XX)	+= wl12xx/
 # small builtin driver bit
-obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx/wl12xx_platform_data.o
+obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx_platform_data.o

 obj-$(CONFIG_IWM)	+= iwmc3200wifi/
diff --git a/drivers/net/wireless/wl12xx/wl12xx_platform_data.c
b/drivers/net/wireless/wl12xx_platform_data.c
similarity index 100%
rename from drivers/net/wireless/wl12xx/wl12xx_platform_data.c
rename to drivers/net/wireless/wl12xx_platform_data.c
-- 
1.7.0.4


>
> I have reverted that commit for today (and commits
> 09cecc340b3b4d9960b039c0f576548bbf857f5a ("wl1271: take irq info from
> private board data") and 15cea99306ae14ce5f7c3d3989bcc17202e2b0be
> ("wl1271: make ref_clock configurable by board") which follow it).
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
>

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
@ 2010-09-27 15:55   ` Ohad Ben-Cohen
  0 siblings, 0 replies; 105+ messages in thread
From: Ohad Ben-Cohen @ 2010-09-27 15:55 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, netdev, linux-next, linux-kernel, John W. Linville

On Mon, Sep 27, 2010 at 7:44 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Assembler messages:
> Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out
>
> Presumably caused by commit 61ee7007a5d61aa066076da578e8e8084e122d7d
> ("wl12xx: add platform data passing support").
>
> I do my builds with a separate object directory (which may be a reason
> you don't see this).

Thank you, Stephen.

I have just tried building with a separate object directory, and I was
then able to reproduce it and fix it with:

From fb0d1dc5ce6c258b3ecb0a8997791a77be3c5307 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Mon, 27 Sep 2010 17:33:57 +0200
Subject: [PATCH] wl12xx: fix separate-object-folder builds

Make this go away (happens when building with a separate object directory):

Assembler messages:
Fatal error: can't create
drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file
or directory
drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function
'wl12xx_get_platform_data':
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot
open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by
earlier errors, bailing out

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
 drivers/net/wireless/Makefile                      |    2 +-
 .../wireless/{wl12xx => }/wl12xx_platform_data.c   |    0
 2 files changed, 1 insertions(+), 1 deletions(-)
 rename drivers/net/wireless/{wl12xx => }/wl12xx_platform_data.c (100%)

diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 85af697..0a64bd5 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -51,6 +51,6 @@ obj-$(CONFIG_MAC80211_HWSIM)	+= mac80211_hwsim.o

 obj-$(CONFIG_WL12XX)	+= wl12xx/
 # small builtin driver bit
-obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx/wl12xx_platform_data.o
+obj-$(CONFIG_WL12XX_PLATFORM_DATA)	+= wl12xx_platform_data.o

 obj-$(CONFIG_IWM)	+= iwmc3200wifi/
diff --git a/drivers/net/wireless/wl12xx/wl12xx_platform_data.c
b/drivers/net/wireless/wl12xx_platform_data.c
similarity index 100%
rename from drivers/net/wireless/wl12xx/wl12xx_platform_data.c
rename to drivers/net/wireless/wl12xx_platform_data.c
-- 
1.7.0.4


>
> I have reverted that commit for today (and commits
> 09cecc340b3b4d9960b039c0f576548bbf857f5a ("wl1271: take irq info from
> private board data") and 15cea99306ae14ce5f7c3d3989bcc17202e2b0be
> ("wl1271: make ref_clock configurable by board") which follow it).
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
>

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-27  5:44 ` Stephen Rothwell
  (?)
@ 2010-09-27  8:17 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2010-09-27  8:17 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, ohad, linville

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 27 Sep 2010 15:44:08 +1000

> After merging the final tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> Assembler messages:
> Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
> drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out
> 
> Presumably caused by commit 61ee7007a5d61aa066076da578e8e8084e122d7d
> ("wl12xx: add platform data passing support").
> 
> I do my builds with a separate object directory (which may be a reason
> you don't see this).

John, please get this fixed, thanks.

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-09-27  5:44 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-09-27  5:44 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Ohad Ben-Cohen, John W. Linville

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

Hi all,

After merging the final tree, today's linux-next build (x86_64
allmodconfig) failed like this:

Assembler messages:
Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out

Presumably caused by commit 61ee7007a5d61aa066076da578e8e8084e122d7d
("wl12xx: add platform data passing support").

I do my builds with a separate object directory (which may be a reason
you don't see this).

I have reverted that commit for today (and commits
09cecc340b3b4d9960b039c0f576548bbf857f5a ("wl1271: take irq info from
private board data") and 15cea99306ae14ce5f7c3d3989bcc17202e2b0be
("wl1271: make ref_clock configurable by board") which follow it).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-09-27  5:44 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-09-27  5:44 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Ohad Ben-Cohen, John W. Linville

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

Hi all,

After merging the final tree, today's linux-next build (x86_64
allmodconfig) failed like this:

Assembler messages:
Fatal error: can't create drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.o: No such file or directory
drivers/net/wireless/wl12xx/wl12xx_platform_data.c: In function 'wl12xx_get_platform_data':
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: error: cannot open drivers/net/wireless/wl12xx/.tmp_wl12xx_platform_data.gcno
drivers/net/wireless/wl12xx/wl12xx_platform_data.c:28: confused by earlier errors, bailing out

Presumably caused by commit 61ee7007a5d61aa066076da578e8e8084e122d7d
("wl12xx: add platform data passing support").

I do my builds with a separate object directory (which may be a reason
you don't see this).

I have reverted that commit for today (and commits
09cecc340b3b4d9960b039c0f576548bbf857f5a ("wl1271: take irq info from
private board data") and 15cea99306ae14ce5f7c3d3989bcc17202e2b0be
("wl1271: make ref_clock configurable by board") which follow it).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-03  1:52   ` Stephen Rothwell
  (?)
@ 2010-09-03  2:16   ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2010-09-03  2:16 UTC (permalink / raw)
  To: sfr
  Cc: netdev, linux-next, linux-kernel, peppe.cavallaro, schwidefsky,
	heiko.carstens

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 3 Sep 2010 11:52:26 +1000

> Hi all,
> 
> On Fri, 3 Sep 2010 11:47:50 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> Exposed by commit ac75791aa943c7953521cb4fa7728bf51f9abd2d ("stmmac:
>> remove dead option in the driver's Kconfig")  That allowed the driver to
>> be built on a lot more platforms that previously.
> 
> That commit was the result of the only platform that this driver was ever
> used on being removed by commit f96691872439ab2071171d4531c4a95b5d493ae5
> ("sh: Kill off the remaining ST40 cruft").  So maybe this driver should
> actually be removed from the tree as well?

That's up to whoever maintains this thing, well... there is no listed
maintainer in MAINTAINERS.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-03  1:47 ` Stephen Rothwell
  (?)
  (?)
@ 2010-09-03  2:14 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2010-09-03  2:14 UTC (permalink / raw)
  To: sfr
  Cc: netdev, linux-next, linux-kernel, peppe.cavallaro, schwidefsky,
	heiko.carstens

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 3 Sep 2010 11:47:50 +1000

> Hi all,
> 
> After merging the final tree, next-20100830 and later builds (s390
> allmodconfig) failed like this:
> 
> drivers/net/stmmac/stmmac_main.c: In function 'stmmac_adjust_link':
> drivers/net/stmmac/stmmac_main.c:217: error: implicit declaration of function 'readl'
> drivers/net/stmmac/stmmac_main.c:270: error: implicit declaration of function 'writel'
> drivers/net/stmmac/stmmac_main.c: In function 'stmmac_dvr_probe':
> drivers/net/stmmac/stmmac_main.c:1676: error: implicit declaration of function 'ioremap'
> drivers/net/stmmac/stmmac_main.c:1676: warning: assignment makes pointer from integer without a cast
> drivers/net/stmmac/stmmac_main.c:1744: warning: cast from pointer to integer of different size
> drivers/net/stmmac/stmmac_main.c:1760: error: implicit declaration of function 'iounmap'
> 
> Exposed by commit ac75791aa943c7953521cb4fa7728bf51f9abd2d ("stmmac:
> remove dead option in the driver's Kconfig")  That allowed the driver to
> be built on a lot more platforms that previously.

I'll make it's Kconfig depend upon the arch having IOMEM or something like
that, thanks.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-09-03  1:47 ` Stephen Rothwell
@ 2010-09-03  1:52   ` Stephen Rothwell
  -1 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-09-03  1:52 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Giuseppe CAVALLARO, Martin Schwidefsky,
	Heiko Carstens

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

Hi all,

On Fri, 3 Sep 2010 11:47:50 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Exposed by commit ac75791aa943c7953521cb4fa7728bf51f9abd2d ("stmmac:
> remove dead option in the driver's Kconfig")  That allowed the driver to
> be built on a lot more platforms that previously.

That commit was the result of the only platform that this driver was ever
used on being removed by commit f96691872439ab2071171d4531c4a95b5d493ae5
("sh: Kill off the remaining ST40 cruft").  So maybe this driver should
actually be removed from the tree as well?

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
@ 2010-09-03  1:52   ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-09-03  1:52 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Giuseppe CAVALLARO, Martin Schwidefsky,
	Heiko Carstens

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

Hi all,

On Fri, 3 Sep 2010 11:47:50 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Exposed by commit ac75791aa943c7953521cb4fa7728bf51f9abd2d ("stmmac:
> remove dead option in the driver's Kconfig")  That allowed the driver to
> be built on a lot more platforms that previously.

That commit was the result of the only platform that this driver was ever
used on being removed by commit f96691872439ab2071171d4531c4a95b5d493ae5
("sh: Kill off the remaining ST40 cruft").  So maybe this driver should
actually be removed from the tree as well?

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

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-09-03  1:47 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-09-03  1:47 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Giuseppe CAVALLARO, Martin Schwidefsky,
	Heiko Carstens

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

Hi all,

After merging the final tree, next-20100830 and later builds (s390
allmodconfig) failed like this:

drivers/net/stmmac/stmmac_main.c: In function 'stmmac_adjust_link':
drivers/net/stmmac/stmmac_main.c:217: error: implicit declaration of function 'readl'
drivers/net/stmmac/stmmac_main.c:270: error: implicit declaration of function 'writel'
drivers/net/stmmac/stmmac_main.c: In function 'stmmac_dvr_probe':
drivers/net/stmmac/stmmac_main.c:1676: error: implicit declaration of function 'ioremap'
drivers/net/stmmac/stmmac_main.c:1676: warning: assignment makes pointer from integer without a cast
drivers/net/stmmac/stmmac_main.c:1744: warning: cast from pointer to integer of different size
drivers/net/stmmac/stmmac_main.c:1760: error: implicit declaration of function 'iounmap'

Exposed by commit ac75791aa943c7953521cb4fa7728bf51f9abd2d ("stmmac:
remove dead option in the driver's Kconfig")  That allowed the driver to
be built on a lot more platforms that previously.

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

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-09-03  1:47 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-09-03  1:47 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Giuseppe CAVALLARO, Martin Schwidefsky,
	Heiko Carstens

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

Hi all,

After merging the final tree, next-20100830 and later builds (s390
allmodconfig) failed like this:

drivers/net/stmmac/stmmac_main.c: In function 'stmmac_adjust_link':
drivers/net/stmmac/stmmac_main.c:217: error: implicit declaration of function 'readl'
drivers/net/stmmac/stmmac_main.c:270: error: implicit declaration of function 'writel'
drivers/net/stmmac/stmmac_main.c: In function 'stmmac_dvr_probe':
drivers/net/stmmac/stmmac_main.c:1676: error: implicit declaration of function 'ioremap'
drivers/net/stmmac/stmmac_main.c:1676: warning: assignment makes pointer from integer without a cast
drivers/net/stmmac/stmmac_main.c:1744: warning: cast from pointer to integer of different size
drivers/net/stmmac/stmmac_main.c:1760: error: implicit declaration of function 'iounmap'

Exposed by commit ac75791aa943c7953521cb4fa7728bf51f9abd2d ("stmmac:
remove dead option in the driver's Kconfig")  That allowed the driver to
be built on a lot more platforms that previously.

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-08-31  3:18 ` Stephen Rothwell
  (?)
@ 2010-08-31  4:43 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2010-08-31  4:43 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, akinobu.mita, fujita.tomonori

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 31 Aug 2010 13:18:12 +1000

> Hi ,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/net/starfire.c: In function 'starfire_init':
> drivers/net/starfire.c:2081: error: negative width in bit-field '<anonymous>'
> 
> This is:
> 	BUILD_BUG_ON(sizeof(dma_addr_t) != sizeof(netdrv_addr_t));
> in starfire_init().
> 
> Immediate cause is commit 56543af9563d91c1c5596a7980b416389bdea071
> ("starfire: use BUILD_BUG_ON for netdrv_addr_t").

I anticipated this and Fujita is working on a solution involving
adding a CONFIG_DMA_ADDR_T_64BIT that the starfire can check
instead of that ugly CPP test.

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-08-31  3:18 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-08-31  3:18 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Akinobu Mita

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

Hi ,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/starfire.c: In function 'starfire_init':
drivers/net/starfire.c:2081: error: negative width in bit-field '<anonymous>'

This is:
	BUILD_BUG_ON(sizeof(dma_addr_t) != sizeof(netdrv_addr_t));
in starfire_init().

Immediate cause is commit 56543af9563d91c1c5596a7980b416389bdea071
("starfire: use BUILD_BUG_ON for netdrv_addr_t").

The real cause is the complete mess at the start of starfire.c that
tries to determine if dma_addr_t is 64 bits or not ...

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-08-31  3:18 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-08-31  3:18 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Akinobu Mita

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

Hi ,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/starfire.c: In function 'starfire_init':
drivers/net/starfire.c:2081: error: negative width in bit-field '<anonymous>'

This is:
	BUILD_BUG_ON(sizeof(dma_addr_t) != sizeof(netdrv_addr_t));
in starfire_init().

Immediate cause is commit 56543af9563d91c1c5596a7980b416389bdea071
("starfire: use BUILD_BUG_ON for netdrv_addr_t").

The real cause is the complete mess at the start of starfire.c that
tries to determine if dma_addr_t is 64 bits or not ...

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-08-30  3:29 ` Simon Horman
@ 2010-08-30  4:23   ` David Miller
  0 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2010-08-30  4:23 UTC (permalink / raw)
  To: horms; +Cc: sfr, netdev, linux-next, linux-kernel

From: Simon Horman <horms@verge.net.au>
Date: Mon, 30 Aug 2010 12:29:39 +0900

> On Mon, Aug 30, 2010 at 01:04:53PM +1000, Stephen Rothwell wrote:
>> Hi all,
>> 
>> After merging the final tree, today's linux-next build (powerpc
>> allyesconfig) failed like this:
>> 
>> net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_nat_icmp_v6':
>> net/netfilter/ipvs/ip_vs_core.c:640: error: implicit declaration of function 'csum_ipv6_magic'
>> 
>> Caused by commit 8870f8427b8fe30b2684b9e569e5ce038faf41ac ("IPVS: ICMPv6
>> checksum calculation").  I added the following patch:
>> [I think we have seen this before :-(]
>> 
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Mon, 30 Aug 2010 13:01:20 +1000
>> Subject: [PATCH] IPVS: include net/ip6_checksum.h for csum_ipv6_magic
>> 
>> Fixes this build error:
>> 
>> net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_nat_icmp_v6':
>> net/netfilter/ipvs/ip_vs_core.c:640: error: implicit declaration of function 'csum_ipv6_magic'
> 
> Sorry about that, I didn't notice it because it doesn't show up on x86.
> 
>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Simon Horman <horms@verge.net.au>

Applied thanks everyone.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-08-30  3:04 ` Stephen Rothwell
  (?)
@ 2010-08-30  3:29 ` Simon Horman
  2010-08-30  4:23   ` David Miller
  -1 siblings, 1 reply; 105+ messages in thread
From: Simon Horman @ 2010-08-30  3:29 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: David Miller, netdev, linux-next, linux-kernel

On Mon, Aug 30, 2010 at 01:04:53PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_nat_icmp_v6':
> net/netfilter/ipvs/ip_vs_core.c:640: error: implicit declaration of function 'csum_ipv6_magic'
> 
> Caused by commit 8870f8427b8fe30b2684b9e569e5ce038faf41ac ("IPVS: ICMPv6
> checksum calculation").  I added the following patch:
> [I think we have seen this before :-(]
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 30 Aug 2010 13:01:20 +1000
> Subject: [PATCH] IPVS: include net/ip6_checksum.h for csum_ipv6_magic
> 
> Fixes this build error:
> 
> net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_nat_icmp_v6':
> net/netfilter/ipvs/ip_vs_core.c:640: error: implicit declaration of function 'csum_ipv6_magic'

Sorry about that, I didn't notice it because it doesn't show up on x86.

> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Simon Horman <horms@verge.net.au>

> ---
>  net/netfilter/ipvs/ip_vs_core.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> index 69661db..edbfb96 100644
> --- a/net/netfilter/ipvs/ip_vs_core.c
> +++ b/net/netfilter/ipvs/ip_vs_core.c
> @@ -40,6 +40,7 @@
>  #include <net/udp.h>
>  #include <net/icmp.h>                   /* for icmp_send */
>  #include <net/route.h>
> +#include <net/ip6_checksum.h>
>  
>  #include <linux/netfilter.h>
>  #include <linux/netfilter_ipv4.h>
> -- 
> 1.7.1
> 
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-08-30  3:04 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-08-30  3:04 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Simon Horman

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_nat_icmp_v6':
net/netfilter/ipvs/ip_vs_core.c:640: error: implicit declaration of function 'csum_ipv6_magic'

Caused by commit 8870f8427b8fe30b2684b9e569e5ce038faf41ac ("IPVS: ICMPv6
checksum calculation").  I added the following patch:
[I think we have seen this before :-(]

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 30 Aug 2010 13:01:20 +1000
Subject: [PATCH] IPVS: include net/ip6_checksum.h for csum_ipv6_magic

Fixes this build error:

net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_nat_icmp_v6':
net/netfilter/ipvs/ip_vs_core.c:640: error: implicit declaration of function 'csum_ipv6_magic'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/netfilter/ipvs/ip_vs_core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 69661db..edbfb96 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -40,6 +40,7 @@
 #include <net/udp.h>
 #include <net/icmp.h>                   /* for icmp_send */
 #include <net/route.h>
+#include <net/ip6_checksum.h>
 
 #include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
-- 
1.7.1


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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-08-30  3:04 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-08-30  3:04 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Simon Horman

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_nat_icmp_v6':
net/netfilter/ipvs/ip_vs_core.c:640: error: implicit declaration of function 'csum_ipv6_magic'

Caused by commit 8870f8427b8fe30b2684b9e569e5ce038faf41ac ("IPVS: ICMPv6
checksum calculation").  I added the following patch:
[I think we have seen this before :-(]

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 30 Aug 2010 13:01:20 +1000
Subject: [PATCH] IPVS: include net/ip6_checksum.h for csum_ipv6_magic

Fixes this build error:

net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_nat_icmp_v6':
net/netfilter/ipvs/ip_vs_core.c:640: error: implicit declaration of function 'csum_ipv6_magic'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/netfilter/ipvs/ip_vs_core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 69661db..edbfb96 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -40,6 +40,7 @@
 #include <net/udp.h>
 #include <net/icmp.h>                   /* for icmp_send */
 #include <net/route.h>
+#include <net/ip6_checksum.h>
 
 #include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
-- 
1.7.1


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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-08-25 20:59     ` David Miller
  2010-08-25 21:53         ` Rasesh Mody
@ 2010-08-26  1:05       ` Stephen Rothwell
  1 sibling, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-08-26  1:05 UTC (permalink / raw)
  To: David Miller
  Cc: rmody, netdev, linux-next, linux-kernel, huangj, James.Bottomley

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

Hi Dave,

On Wed, 25 Aug 2010 13:59:57 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> Stephen Rothwell is going to build his -next tree for today any minute
> now and will have to revert your driver from his tree again since a
> fix is not yet in place.

I have done that ...

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

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

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

* RE: linux-next: build failure after merge of the final tree (net tree related)
  2010-08-25 20:59     ` David Miller
@ 2010-08-25 21:53         ` Rasesh Mody
  2010-08-26  1:05       ` Stephen Rothwell
  1 sibling, 0 replies; 105+ messages in thread
From: Rasesh Mody @ 2010-08-25 21:53 UTC (permalink / raw)
  To: David Miller
  Cc: sfr, netdev, linux-next, linux-kernel, Jing Huang, Debashis Dutt,
	James.Bottomley

>From: David Miller <davem@davemloft.net>
>Date: Wed, 25 Aug 2010 00:35:26 -0700 (PDT)
>
>> From: Rasesh Mody <rmody@brocade.com>
>> Date: Tue, 24 Aug 2010 21:22:19 -0700
>> 
>>> All,
>>> 
>>> We are working on a fix and we will submit a patch soon.
>
>Well, where is the fix and why is it taking so long?
>
>Stephen Rothwell is going to build his -next tree for today any minute
>now and will have to revert your driver from his tree again since a
>fix is not yet in place.
>
>If I don't see a fix quickly, I'll fix it however I like and however
>I like might be yanking your driver out of the tree.
>
>Thanks.

Hi David,

We have submitted a patch to fix this issue.
Please let us know if this is good.

Thanks,
Rasesh

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

* RE: linux-next: build failure after merge of the final tree (net tree related)
@ 2010-08-25 21:53         ` Rasesh Mody
  0 siblings, 0 replies; 105+ messages in thread
From: Rasesh Mody @ 2010-08-25 21:53 UTC (permalink / raw)
  To: David Miller
  Cc: sfr, netdev, linux-next, linux-kernel, Jing Huang, Debashis Dutt,
	James.Bottomley

>From: David Miller <davem@davemloft.net>
>Date: Wed, 25 Aug 2010 00:35:26 -0700 (PDT)
>
>> From: Rasesh Mody <rmody@brocade.com>
>> Date: Tue, 24 Aug 2010 21:22:19 -0700
>> 
>>> All,
>>> 
>>> We are working on a fix and we will submit a patch soon.
>
>Well, where is the fix and why is it taking so long?
>
>Stephen Rothwell is going to build his -next tree for today any minute
>now and will have to revert your driver from his tree again since a
>fix is not yet in place.
>
>If I don't see a fix quickly, I'll fix it however I like and however
>I like might be yanking your driver out of the tree.
>
>Thanks.

Hi David,

We have submitted a patch to fix this issue.
Please let us know if this is good.

Thanks,
Rasesh

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-08-25  7:35   ` David Miller
@ 2010-08-25 20:59     ` David Miller
  2010-08-25 21:53         ` Rasesh Mody
  2010-08-26  1:05       ` Stephen Rothwell
  0 siblings, 2 replies; 105+ messages in thread
From: David Miller @ 2010-08-25 20:59 UTC (permalink / raw)
  To: rmody; +Cc: sfr, netdev, linux-next, linux-kernel, huangj, James.Bottomley

From: David Miller <davem@davemloft.net>
Date: Wed, 25 Aug 2010 00:35:26 -0700 (PDT)

> From: Rasesh Mody <rmody@brocade.com>
> Date: Tue, 24 Aug 2010 21:22:19 -0700
> 
>> All,
>> 
>> We are working on a fix and we will submit a patch soon.

Well, where is the fix and why is it taking so long?

Stephen Rothwell is going to build his -next tree for today any minute
now and will have to revert your driver from his tree again since a
fix is not yet in place.

If I don't see a fix quickly, I'll fix it however I like and however
I like might be yanking your driver out of the tree.

Thanks.

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-08-25  4:22 ` Rasesh Mody
@ 2010-08-25  7:35   ` David Miller
  2010-08-25 20:59     ` David Miller
  0 siblings, 1 reply; 105+ messages in thread
From: David Miller @ 2010-08-25  7:35 UTC (permalink / raw)
  To: rmody; +Cc: sfr, netdev, linux-next, linux-kernel, huangj, James.Bottomley

From: Rasesh Mody <rmody@brocade.com>
Date: Tue, 24 Aug 2010 21:22:19 -0700

> All,
> 
> We are working on a fix and we will submit a patch soon.

Thanks, but please do not top-post.

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

* RE: linux-next: build failure after merge of the final tree (net tree related)
  2010-08-25  2:09 ` Stephen Rothwell
  (?)
@ 2010-08-25  4:22 ` Rasesh Mody
  2010-08-25  7:35   ` David Miller
  -1 siblings, 1 reply; 105+ messages in thread
From: Rasesh Mody @ 2010-08-25  4:22 UTC (permalink / raw)
  To: Stephen Rothwell, David Miller, netdev
  Cc: linux-next, linux-kernel, Jing Huang, James Bottomley

All,

We are working on a fix and we will submit a patch soon.

Regards,
Rasesh

-----Original Message-----
From: Stephen Rothwell [mailto:sfr@canb.auug.org.au] 
Sent: Tuesday, August 24, 2010 7:09 PM
To: David Miller; netdev@vger.kernel.org
Cc: linux-next@vger.kernel.org; linux-kernel@vger.kernel.org; Rasesh Mody; Jing Huang; James Bottomley
Subject: linux-next: build failure after merge of the final tree (net tree related)

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/built-in.o: In function `bfa_ioc_is_operational':
(.opd+0x1c6c8): multiple definition of `bfa_ioc_is_operational'
drivers/scsi/built-in.o:(.opd+0x1b1b0): first defined here

and many more ...

Caused by commit 8b230ed8ec96c933047dd0625cf95f739e4939a6 ("bna: Brocade 10Gb Ethernet device driver") interacting with commit a whole series of patches to do with the Brocade BFA FC SCSI driver that are in Linus' tree stretching back to v2.6.32-rc2.

I have reverted that net tree commit (and commit
f04b4dd2b1f533cef0507e0410ffc6732d21a272 ("bna: Delete get_flags and set_flags ethtool methods") that depends on it).

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-08-25  2:09 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-08-25  2:09 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Rasesh Mody, Jing Huang, James Bottomley

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

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/built-in.o: In function `bfa_ioc_is_operational':
(.opd+0x1c6c8): multiple definition of `bfa_ioc_is_operational'
drivers/scsi/built-in.o:(.opd+0x1b1b0): first defined here

and many more ...

Caused by commit 8b230ed8ec96c933047dd0625cf95f739e4939a6 ("bna: Brocade
10Gb Ethernet device driver") interacting with commit a whole series of
patches to do with the Brocade BFA FC SCSI driver that are in Linus' tree
stretching back to v2.6.32-rc2.

I have reverted that net tree commit (and commit
f04b4dd2b1f533cef0507e0410ffc6732d21a272 ("bna: Delete get_flags and
set_flags ethtool methods") that depends on it).

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

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-08-25  2:09 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-08-25  2:09 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Rasesh Mody, Jing Huang, James Bottomley

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

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/built-in.o: In function `bfa_ioc_is_operational':
(.opd+0x1c6c8): multiple definition of `bfa_ioc_is_operational'
drivers/scsi/built-in.o:(.opd+0x1b1b0): first defined here

and many more ...

Caused by commit 8b230ed8ec96c933047dd0625cf95f739e4939a6 ("bna: Brocade
10Gb Ethernet device driver") interacting with commit a whole series of
patches to do with the Brocade BFA FC SCSI driver that are in Linus' tree
stretching back to v2.6.32-rc2.

I have reverted that net tree commit (and commit
f04b4dd2b1f533cef0507e0410ffc6732d21a272 ("bna: Delete get_flags and
set_flags ethtool methods") that depends on it).

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-08-23  3:27 ` Stephen Rothwell
  (?)
@ 2010-08-23  3:31 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2010-08-23  3:31 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, baronchon

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 23 Aug 2010 13:27:34 +1000

> Subject: [PATCH] net/sched: need to include net/ip6_checksum.h
> 
> for the declararion of csum_ipv6_magic.
> 
> Fixes this build error on PowerPC (at least):
> 
> net/sched/act_csum.c: In function 'tcf_csum_ipv6_icmp':
> net/sched/act_csum.c:178: error: implicit declaration of function 'csum_ipv6_magic'
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Oh, if I only had a dollar for every time we've had to fix up
something like this :-)

Applied, thanks!

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-08-23  3:27 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-08-23  3:27 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, "Grégoire Baron"

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

net/sched/act_csum.c: In function 'tcf_csum_ipv6_icmp':
net/sched/act_csum.c:178: error: implicit declaration of function 'csum_ipv6_magic'

Caused by commit eb4d40654505e47aa9d2035bb97f631fa61d14b4 ("net/sched:
add ACT_CSUM action to update packets checksums").

I added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 23 Aug 2010 13:23:22 +1000
Subject: [PATCH] net/sched: need to include net/ip6_checksum.h

for the declararion of csum_ipv6_magic.

Fixes this build error on PowerPC (at least):

net/sched/act_csum.c: In function 'tcf_csum_ipv6_icmp':
net/sched/act_csum.c:178: error: implicit declaration of function 'csum_ipv6_magic'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/sched/act_csum.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index 58d7f36..be41f1c 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -29,6 +29,7 @@
 #include <linux/igmp.h>
 #include <net/tcp.h>
 #include <net/udp.h>
+#include <net/ip6_checksum.h>
 
 #include <net/act_api.h>
 
-- 
1.7.1

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-08-23  3:27 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-08-23  3:27 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, "Grégoire Baron"

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

net/sched/act_csum.c: In function 'tcf_csum_ipv6_icmp':
net/sched/act_csum.c:178: error: implicit declaration of function 'csum_ipv6_magic'

Caused by commit eb4d40654505e47aa9d2035bb97f631fa61d14b4 ("net/sched:
add ACT_CSUM action to update packets checksums").

I added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 23 Aug 2010 13:23:22 +1000
Subject: [PATCH] net/sched: need to include net/ip6_checksum.h

for the declararion of csum_ipv6_magic.

Fixes this build error on PowerPC (at least):

net/sched/act_csum.c: In function 'tcf_csum_ipv6_icmp':
net/sched/act_csum.c:178: error: implicit declaration of function 'csum_ipv6_magic'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/sched/act_csum.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index 58d7f36..be41f1c 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -29,6 +29,7 @@
 #include <linux/igmp.h>
 #include <net/tcp.h>
 #include <net/udp.h>
+#include <net/ip6_checksum.h>
 
 #include <net/act_api.h>
 
-- 
1.7.1

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-07-29  4:13 ` Stephen Rothwell
  (?)
@ 2010-07-29  5:21 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2010-07-29  5:21 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, dmitry, eilong

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Jul 2010 14:13:06 +1000

> net: bnx2x_cmn.c needs net/ip6_checksum.h for csum_ipv6_magic
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied, thanks Stephen.

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-07-29  4:13 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-07-29  4:13 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Dmitry Kravkov, Eilon Greenstein

Hi Dave,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/bnx2x/bnx2x_cmn.c: In function 'bnx2x_start_xmit':
drivers/net/bnx2x/bnx2x_cmn.c:2015: error: implicit declaration of function 'csum_ipv6_magic'

Caused by commit 9f6c925889ad9204c7d1f5ca116d2e5fd6036c72 ("bnx2x: Create
bnx2x_cmn.* files").  See Rule 1 in Documentation/SubmitChecklist. :-)

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Jul 2010 14:07:49 +1000
Subject: [PATCH] net: bnx2x_cmn.c needs net/ip6_checksum.h for csum_ipv6_magic

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/bnx2x/bnx2x_cmn.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 30d20c7..02bf710 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -19,6 +19,7 @@
 #include <linux/etherdevice.h>
 #include <linux/ip.h>
 #include <linux/ipv6.h>
+#include <net/ip6_checksum.h>
 #include "bnx2x_cmn.h"
 
 #ifdef BCM_VLAN
-- 
1.7.1

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-07-29  4:13 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-07-29  4:13 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Dmitry Kravkov, Eilon Greenstein

Hi Dave,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/net/bnx2x/bnx2x_cmn.c: In function 'bnx2x_start_xmit':
drivers/net/bnx2x/bnx2x_cmn.c:2015: error: implicit declaration of function 'csum_ipv6_magic'

Caused by commit 9f6c925889ad9204c7d1f5ca116d2e5fd6036c72 ("bnx2x: Create
bnx2x_cmn.* files").  See Rule 1 in Documentation/SubmitChecklist. :-)

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Jul 2010 14:07:49 +1000
Subject: [PATCH] net: bnx2x_cmn.c needs net/ip6_checksum.h for csum_ipv6_magic

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/bnx2x/bnx2x_cmn.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 30d20c7..02bf710 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -19,6 +19,7 @@
 #include <linux/etherdevice.h>
 #include <linux/ip.h>
 #include <linux/ipv6.h>
+#include <net/ip6_checksum.h>
 #include "bnx2x_cmn.h"
 
 #ifdef BCM_VLAN
-- 
1.7.1

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-04-27 17:18   ` David Miller
@ 2010-04-28  1:11     ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-04-28  1:11 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-next, linux-kernel, yoshfuji

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

Hi Dave,

On Tue, 27 Apr 2010 10:18:04 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> I just committed the following for this:
> 
> bridge: Fix build of ipv6 multicast code.

Thanks.

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-04-27 16:34 ` David Miller
@ 2010-04-27 17:18   ` David Miller
  2010-04-28  1:11     ` Stephen Rothwell
  0 siblings, 1 reply; 105+ messages in thread
From: David Miller @ 2010-04-27 17:18 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, yoshfuji

From: David Miller <davem@davemloft.net>
Date: Tue, 27 Apr 2010 09:34:30 -0700 (PDT)

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 27 Apr 2010 15:25:16 +1000
> 
>> After merging the bkl-ioctl tree, today's linux-next build (powerpc
>> ppc44x_defconfig) failed like this:
>> 
>> net/bridge/br_multicast.c: In function 'br_ip6_multicast_alloc_query':
>> net/bridge/br_multicast.c:469: error: implicit declaration of function 'csum_ipv6_magic'
>> 
>> Introduced by commit 08b202b6726459626c73ecfa08fcdc8c3efc76c2 ("bridge
>> br_multicast: IPv6 MLD support") from the net tree.
>> 
>> csum_ipv6_magic is declared in net/ip6_checksum.h ...
> 
> Bummer, powerpc is one of the few platforms that doesn't get the header
> file implicitly so you always trip over this whereas we never see it in
> x86 and sparc64 builds :-)
> 
> I'll fix this, thanks!

I just committed the following for this:

bridge: Fix build of ipv6 multicast code.

Based upon a report from Stephen Rothwell:

--------------------
net/bridge/br_multicast.c: In function 'br_ip6_multicast_alloc_query':
net/bridge/br_multicast.c:469: error: implicit declaration of function 'csum_ipv6_magic'

Introduced by commit 08b202b6726459626c73ecfa08fcdc8c3efc76c2 ("bridge
br_multicast: IPv6 MLD support") from the net tree.

csum_ipv6_magic is declared in net/ip6_checksum.h ...
--------------------

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/bridge/br_multicast.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index e481dbd..2048ef0 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -28,6 +28,7 @@
 #include <net/ipv6.h>
 #include <net/mld.h>
 #include <net/addrconf.h>
+#include <net/ip6_checksum.h>
 #endif
 
 #include "br_private.h"
-- 
1.7.0.4


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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-04-27  5:25 ` Stephen Rothwell
  (?)
@ 2010-04-27 16:34 ` David Miller
  2010-04-27 17:18   ` David Miller
  -1 siblings, 1 reply; 105+ messages in thread
From: David Miller @ 2010-04-27 16:34 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, yoshfuji

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 27 Apr 2010 15:25:16 +1000

> After merging the bkl-ioctl tree, today's linux-next build (powerpc
> ppc44x_defconfig) failed like this:
> 
> net/bridge/br_multicast.c: In function 'br_ip6_multicast_alloc_query':
> net/bridge/br_multicast.c:469: error: implicit declaration of function 'csum_ipv6_magic'
> 
> Introduced by commit 08b202b6726459626c73ecfa08fcdc8c3efc76c2 ("bridge
> br_multicast: IPv6 MLD support") from the net tree.
> 
> csum_ipv6_magic is declared in net/ip6_checksum.h ...

Bummer, powerpc is one of the few platforms that doesn't get the header
file implicitly so you always trip over this whereas we never see it in
x86 and sparc64 builds :-)

I'll fix this, thanks!

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-04-27  5:25 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-04-27  5:25 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, YOSHIFUJI Hideaki

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

Hi Dave,

After merging the bkl-ioctl tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

net/bridge/br_multicast.c: In function 'br_ip6_multicast_alloc_query':
net/bridge/br_multicast.c:469: error: implicit declaration of function 'csum_ipv6_magic'

Introduced by commit 08b202b6726459626c73ecfa08fcdc8c3efc76c2 ("bridge
br_multicast: IPv6 MLD support") from the net tree.

csum_ipv6_magic is declared in net/ip6_checksum.h ...

I have reverted this commit (and 1fafc7a9353ef68e1b8d4bb130cb6402cf7dfd5a
"bridge br_multicast: Ensure to initialize BR_INPUT_SKB_CB
(skb)->mrouters_only" which depended on it) for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-04-27  5:25 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-04-27  5:25 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, YOSHIFUJI Hideaki

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

Hi Dave,

After merging the bkl-ioctl tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

net/bridge/br_multicast.c: In function 'br_ip6_multicast_alloc_query':
net/bridge/br_multicast.c:469: error: implicit declaration of function 'csum_ipv6_magic'

Introduced by commit 08b202b6726459626c73ecfa08fcdc8c3efc76c2 ("bridge
br_multicast: IPv6 MLD support") from the net tree.

csum_ipv6_magic is declared in net/ip6_checksum.h ...

I have reverted this commit (and 1fafc7a9353ef68e1b8d4bb130cb6402cf7dfd5a
"bridge br_multicast: Ensure to initialize BR_INPUT_SKB_CB
(skb)->mrouters_only" which depended on it) for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-03-29  8:01     ` David Miller
@ 2010-03-29  8:04       ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-03-29  8:04 UTC (permalink / raw)
  To: David Miller; +Cc: eric.dumazet, netdev, linux-next, linux-kernel, therbert

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

Hi Dave,

On Mon, 29 Mar 2010 01:01:04 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 29 Mar 2010 08:59:30 +0200
> 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
>  ...
> > Oops, a cleaner patch would be :
> > 
> > [PATCH] rps: fix net-sysfs build for !CONFIG_RPS
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> 
> Applied, thanks guys!

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-03-29  6:59   ` Eric Dumazet
@ 2010-03-29  8:01     ` David Miller
  2010-03-29  8:04       ` Stephen Rothwell
  0 siblings, 1 reply; 105+ messages in thread
From: David Miller @ 2010-03-29  8:01 UTC (permalink / raw)
  To: eric.dumazet; +Cc: sfr, netdev, linux-next, linux-kernel, therbert

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 29 Mar 2010 08:59:30 +0200

> From: Stephen Rothwell <sfr@canb.auug.org.au>
 ...
> Oops, a cleaner patch would be :
> 
> [PATCH] rps: fix net-sysfs build for !CONFIG_RPS
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied, thanks guys!

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-03-29  6:52 ` Eric Dumazet
  2010-03-29  6:59   ` Eric Dumazet
@ 2010-03-29  7:01   ` Stephen Rothwell
  1 sibling, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-03-29  7:01 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev, linux-next, linux-kernel, Tom Herbert

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

Hi Eric,

On Mon, 29 Mar 2010 08:52:41 +0200 Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> Thats right, this was on my first submission, but I forgot to add
> net/core/net-sysfs.c in my second commit, sorry.
> 
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

Thanks for the confirmation.

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

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-03-29  6:52 ` Eric Dumazet
@ 2010-03-29  6:59   ` Eric Dumazet
  2010-03-29  8:01     ` David Miller
  2010-03-29  7:01   ` Stephen Rothwell
  1 sibling, 1 reply; 105+ messages in thread
From: Eric Dumazet @ 2010-03-29  6:59 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, netdev, linux-next, linux-kernel, Tom Herbert

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

Le lundi 29 mars 2010 à 08:52 +0200, Eric Dumazet a écrit :
> Le lundi 29 mars 2010 à 17:43 +1100, Stephen Rothwell a écrit :
> > Hi Dave,
> > 
> > After merging the final tree, today's linux-next build (powerpc
> > ppc44x_defconfig) failed like this:
> > 
> > net/core/net-sysfs.c:476: warning: 'struct netdev_rx_queue' declared inside parameter list
> > net/core/net-sysfs.c:476: warning: its scope is only this definition or declaration, which is probably not what you want
> > net/core/net-sysfs.c:478: warning: 'struct netdev_rx_queue' declared inside parameter list
> > net/core/net-sysfs.c: In function 'rx_queue_attr_show':
> > net/core/net-sysfs.c:489: error: dereferencing pointer to incomplete type
> > net/core/net-sysfs.c:489: warning: type defaults to 'int' in declaration of '__mptr'
> > net/core/net-sysfs.c:489: warning: initialization from incompatible pointer type
> > net/core/net-sysfs.c:489: error: invalid use of undefined type 'struct netdev_rx_queue'
> > net/core/net-sysfs.c:494: warning: passing argument 1 of 'attribute->show' from incompatible pointer type
> > net/core/net-sysfs.c:494: note: expected 'struct netdev_rx_queue *' but argument is of type 'struct netdev_rx_queue *'
> > 
> > (and many more)
> > 
> > Caused by commit 0a9627f2649a02bea165cfd529d7bcb625c2fcad ("rps: Receive
> > Packet Steering") from the net tree.  struct netdev_rx_queue is protected by
> > CONFIG_RPS in netdevice.h, but uses are not so protected in net-sysfs.c.
> > 
> > I applied the following patch for today:
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 29 Mar 2010 17:27:55 +1100
> > Subject: [PATCH] rps: fix net-sysfs build for !CONFIG_RPS
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Oops, a cleaner patch would be :

[PATCH] rps: fix net-sysfs build for !CONFIG_RPS

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index f6b6bfe..2144a7f 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -466,6 +466,7 @@ static struct attribute_group wireless_group = {
 };
 #endif
 
+#ifdef CONFIG_RPS
 /*
  * RX queue sysfs structures and functions.
  */
@@ -675,7 +676,7 @@ static void rx_queue_remove_kobjects(struct net_device *net)
 		kobject_put(&net->_rx[i].kobj);
 	kset_unregister(net->queues_kset);
 }
-
+#endif /* CONFIG_RPS */
 #endif /* CONFIG_SYSFS */
 
 #ifdef CONFIG_HOTPLUG
@@ -739,7 +740,7 @@ void netdev_unregister_kobject(struct net_device * net)
 	if (!net_eq(dev_net(net), &init_net))
 		return;
 
-#ifdef CONFIG_SYSFS
+#ifdef CONFIG_RPS
 	rx_queue_remove_kobjects(net);
 #endif
 
@@ -782,7 +783,7 @@ int netdev_register_kobject(struct net_device *net)
 	if (error)
 		return error;
 
-#ifdef CONFIG_SYSFS
+#ifdef CONFIG_RPS
 	error = rx_queue_register_kobjects(net);
 	if (error) {
 		device_del(dev);



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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-03-29  6:43 ` Stephen Rothwell
  (?)
@ 2010-03-29  6:52 ` Eric Dumazet
  2010-03-29  6:59   ` Eric Dumazet
  2010-03-29  7:01   ` Stephen Rothwell
  -1 siblings, 2 replies; 105+ messages in thread
From: Eric Dumazet @ 2010-03-29  6:52 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, netdev, linux-next, linux-kernel, Tom Herbert

Le lundi 29 mars 2010 à 17:43 +1100, Stephen Rothwell a écrit :
> Hi Dave,
> 
> After merging the final tree, today's linux-next build (powerpc
> ppc44x_defconfig) failed like this:
> 
> net/core/net-sysfs.c:476: warning: 'struct netdev_rx_queue' declared inside parameter list
> net/core/net-sysfs.c:476: warning: its scope is only this definition or declaration, which is probably not what you want
> net/core/net-sysfs.c:478: warning: 'struct netdev_rx_queue' declared inside parameter list
> net/core/net-sysfs.c: In function 'rx_queue_attr_show':
> net/core/net-sysfs.c:489: error: dereferencing pointer to incomplete type
> net/core/net-sysfs.c:489: warning: type defaults to 'int' in declaration of '__mptr'
> net/core/net-sysfs.c:489: warning: initialization from incompatible pointer type
> net/core/net-sysfs.c:489: error: invalid use of undefined type 'struct netdev_rx_queue'
> net/core/net-sysfs.c:494: warning: passing argument 1 of 'attribute->show' from incompatible pointer type
> net/core/net-sysfs.c:494: note: expected 'struct netdev_rx_queue *' but argument is of type 'struct netdev_rx_queue *'
> 
> (and many more)
> 
> Caused by commit 0a9627f2649a02bea165cfd529d7bcb625c2fcad ("rps: Receive
> Packet Steering") from the net tree.  struct netdev_rx_queue is protected by
> CONFIG_RPS in netdevice.h, but uses are not so protected in net-sysfs.c.
> 
> I applied the following patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 29 Mar 2010 17:27:55 +1100
> Subject: [PATCH] rps: fix net-sysfs build for !CONFIG_RPS
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  net/core/net-sysfs.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
> index c810042..95af841 100644
> --- a/net/core/net-sysfs.c
> +++ b/net/core/net-sysfs.c
> @@ -467,6 +467,7 @@ static struct attribute_group wireless_group = {
>  };
>  #endif
>  
> +#ifdef CONFIG_RPS
>  /*
>   * RX queue sysfs structures and functions.
>   */
> @@ -677,6 +678,12 @@ static void rx_queue_remove_kobjects(struct net_device *net)
>  	kset_unregister(net->queues_kset);
>  }
>  
> +#else /* CONFIG_RPS */
> +
> +static int rx_queue_register_kobjects(struct net_device *net) { return 0; }
> +static void rx_queue_remove_kobjects(struct net_device *net) { }
> +
> +#endif /* CONFIG_RPS */
>  #endif /* CONFIG_SYSFS */
>  
>  #ifdef CONFIG_HOTPLUG
> -- 
> 1.7.0.3


Thats right, this was on my first submission, but I forgot to add
net/core/net-sysfs.c in my second commit, sorry.

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>




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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-03-29  6:43 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-03-29  6:43 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Tom Herbert, Eric Dumazet

Hi Dave,

After merging the final tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

net/core/net-sysfs.c:476: warning: 'struct netdev_rx_queue' declared inside parameter list
net/core/net-sysfs.c:476: warning: its scope is only this definition or declaration, which is probably not what you want
net/core/net-sysfs.c:478: warning: 'struct netdev_rx_queue' declared inside parameter list
net/core/net-sysfs.c: In function 'rx_queue_attr_show':
net/core/net-sysfs.c:489: error: dereferencing pointer to incomplete type
net/core/net-sysfs.c:489: warning: type defaults to 'int' in declaration of '__mptr'
net/core/net-sysfs.c:489: warning: initialization from incompatible pointer type
net/core/net-sysfs.c:489: error: invalid use of undefined type 'struct netdev_rx_queue'
net/core/net-sysfs.c:494: warning: passing argument 1 of 'attribute->show' from incompatible pointer type
net/core/net-sysfs.c:494: note: expected 'struct netdev_rx_queue *' but argument is of type 'struct netdev_rx_queue *'

(and many more)

Caused by commit 0a9627f2649a02bea165cfd529d7bcb625c2fcad ("rps: Receive
Packet Steering") from the net tree.  struct netdev_rx_queue is protected by
CONFIG_RPS in netdevice.h, but uses are not so protected in net-sysfs.c.

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 29 Mar 2010 17:27:55 +1100
Subject: [PATCH] rps: fix net-sysfs build for !CONFIG_RPS

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/core/net-sysfs.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index c810042..95af841 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -467,6 +467,7 @@ static struct attribute_group wireless_group = {
 };
 #endif
 
+#ifdef CONFIG_RPS
 /*
  * RX queue sysfs structures and functions.
  */
@@ -677,6 +678,12 @@ static void rx_queue_remove_kobjects(struct net_device *net)
 	kset_unregister(net->queues_kset);
 }
 
+#else /* CONFIG_RPS */
+
+static int rx_queue_register_kobjects(struct net_device *net) { return 0; }
+static void rx_queue_remove_kobjects(struct net_device *net) { }
+
+#endif /* CONFIG_RPS */
 #endif /* CONFIG_SYSFS */
 
 #ifdef CONFIG_HOTPLUG
-- 
1.7.0.3

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-03-29  6:43 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-03-29  6:43 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Tom Herbert, Eric Dumazet

Hi Dave,

After merging the final tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

net/core/net-sysfs.c:476: warning: 'struct netdev_rx_queue' declared inside parameter list
net/core/net-sysfs.c:476: warning: its scope is only this definition or declaration, which is probably not what you want
net/core/net-sysfs.c:478: warning: 'struct netdev_rx_queue' declared inside parameter list
net/core/net-sysfs.c: In function 'rx_queue_attr_show':
net/core/net-sysfs.c:489: error: dereferencing pointer to incomplete type
net/core/net-sysfs.c:489: warning: type defaults to 'int' in declaration of '__mptr'
net/core/net-sysfs.c:489: warning: initialization from incompatible pointer type
net/core/net-sysfs.c:489: error: invalid use of undefined type 'struct netdev_rx_queue'
net/core/net-sysfs.c:494: warning: passing argument 1 of 'attribute->show' from incompatible pointer type
net/core/net-sysfs.c:494: note: expected 'struct netdev_rx_queue *' but argument is of type 'struct netdev_rx_queue *'

(and many more)

Caused by commit 0a9627f2649a02bea165cfd529d7bcb625c2fcad ("rps: Receive
Packet Steering") from the net tree.  struct netdev_rx_queue is protected by
CONFIG_RPS in netdevice.h, but uses are not so protected in net-sysfs.c.

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 29 Mar 2010 17:27:55 +1100
Subject: [PATCH] rps: fix net-sysfs build for !CONFIG_RPS

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/core/net-sysfs.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index c810042..95af841 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -467,6 +467,7 @@ static struct attribute_group wireless_group = {
 };
 #endif
 
+#ifdef CONFIG_RPS
 /*
  * RX queue sysfs structures and functions.
  */
@@ -677,6 +678,12 @@ static void rx_queue_remove_kobjects(struct net_device *net)
 	kset_unregister(net->queues_kset);
 }
 
+#else /* CONFIG_RPS */
+
+static int rx_queue_register_kobjects(struct net_device *net) { return 0; }
+static void rx_queue_remove_kobjects(struct net_device *net) { }
+
+#endif /* CONFIG_RPS */
 #endif /* CONFIG_SYSFS */
 
 #ifdef CONFIG_HOTPLUG
-- 
1.7.0.3

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

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

* Re: linux-next: build failure after merge of the final tree (net tree related)
  2010-03-18  4:23 ` Stephen Rothwell
  (?)
@ 2010-03-18  6:23 ` David Miller
  -1 siblings, 0 replies; 105+ messages in thread
From: David Miller @ 2010-03-18  6:23 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, therbert

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 18 Mar 2010 15:23:51 +1100

> After merging the final tree, today's linux-next build (powerpc
> ppc44x_defconfig) failed like this:
> 
> net/core/dev.c: In function 'net_rps_action':
> net/core/dev.c:3183: error: implicit declaration of function '__smp_call_function_single'
> 
> Caused by commit 0a9627f2649a02bea165cfd529d7bcb625c2fcad ("rps: Receive
> Packet Steering") from the net tree.   This config does not have
> CONFIG_SMP set.  __smp_call_function_single is only available when
> CONFIG_SMP is set.

Tom, please send me a fix for this soon.

Thanks!

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-03-18  4:23 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-03-18  4:23 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Tom Herbert

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

Hi Dave,

After merging the final tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

net/core/dev.c: In function 'net_rps_action':
net/core/dev.c:3183: error: implicit declaration of function '__smp_call_function_single'

Caused by commit 0a9627f2649a02bea165cfd529d7bcb625c2fcad ("rps: Receive
Packet Steering") from the net tree.   This config does not have
CONFIG_SMP set.  __smp_call_function_single is only available when
CONFIG_SMP is set.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* linux-next: build failure after merge of the final tree (net tree related)
@ 2010-03-18  4:23 ` Stephen Rothwell
  0 siblings, 0 replies; 105+ messages in thread
From: Stephen Rothwell @ 2010-03-18  4:23 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Tom Herbert

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

Hi Dave,

After merging the final tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

net/core/dev.c: In function 'net_rps_action':
net/core/dev.c:3183: error: implicit declaration of function '__smp_call_function_single'

Caused by commit 0a9627f2649a02bea165cfd529d7bcb625c2fcad ("rps: Receive
Packet Steering") from the net tree.   This config does not have
CONFIG_SMP set.  __smp_call_function_single is only available when
CONFIG_SMP is set.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

end of thread, other threads:[~2012-01-16  7:37 UTC | newest]

Thread overview: 105+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-09  5:38 linux-next: build failure after merge of the final tree (net tree related) Stephen Rothwell
2012-01-09  5:38 ` Stephen Rothwell
2012-01-09  6:52 ` David Miller
2012-01-16  7:36   ` Glauber Costa
2012-01-16  7:36     ` Glauber Costa
  -- strict thread matches above, loose matches on Subject: below --
2011-12-22  6:07 Stephen Rothwell
2011-12-22  6:07 ` Stephen Rothwell
2011-12-22  6:16 ` Eric Dumazet
2011-12-22  7:01 ` David Miller
2011-11-02  5:37 Stephen Rothwell
2011-11-02  5:37 ` Stephen Rothwell
2011-11-02  5:50 ` David Miller
2011-08-15  5:20 Stephen Rothwell
2011-08-15  5:56 ` David Miller
2011-08-16  5:28   ` Stephen Rothwell
2011-08-16  6:11     ` David Miller
2011-08-16  6:57       ` Stephen Rothwell
2011-08-16  7:17         ` David Miller
2011-06-23  5:29 Stephen Rothwell
2011-06-23  5:29 ` Stephen Rothwell
2011-06-23 13:04 ` Alexey Dobriyan
2011-06-27  5:29   ` Stephen Rothwell
2011-06-29  6:09     ` Stephen Rothwell
2011-06-29  9:58       ` David Miller
2011-06-23  5:25 Stephen Rothwell
2011-06-23  5:25 ` Stephen Rothwell
2011-06-27  5:35 ` Stephen Rothwell
2011-06-27  5:35   ` Stephen Rothwell
2011-06-29  6:01   ` Stephen Rothwell
2011-06-29  6:01     ` Stephen Rothwell
2011-06-29  9:56     ` David Miller
2011-06-08  5:54 Stephen Rothwell
2011-06-08  5:54 ` Stephen Rothwell
2011-06-08  7:16 ` David Miller
2011-04-21 22:10 Stephen Rothwell
2011-04-21 22:10 ` Stephen Rothwell
2011-04-21 22:19 ` David Miller
2011-02-03  4:13 Stephen Rothwell
2011-02-03  4:13 ` Stephen Rothwell
2011-02-03  4:46 ` David Miller
2011-02-03  5:14   ` Stephen Rothwell
2010-11-15  0:46 Stephen Rothwell
2010-11-15  0:46 ` Stephen Rothwell
2010-11-15 16:52 ` David Miller
2010-11-15 16:58   ` Eric Dumazet
2010-10-18  7:36 Stephen Rothwell
2010-10-18  7:36 ` Stephen Rothwell
2010-10-18  8:06 ` David Miller
2010-09-27  5:44 Stephen Rothwell
2010-09-27  5:44 ` Stephen Rothwell
2010-09-27  8:17 ` David Miller
2010-09-27 15:55 ` Ohad Ben-Cohen
2010-09-27 15:55   ` Ohad Ben-Cohen
2010-09-27 18:04   ` John W. Linville
2010-09-27 18:18     ` David Miller
2010-09-27 18:25       ` John W. Linville
2010-09-27 18:38         ` Ohad Ben-Cohen
2010-09-27 18:44           ` John W. Linville
2010-09-27 19:01             ` Ohad Ben-Cohen
2010-09-27 19:06               ` Ohad Ben-Cohen
2010-09-27 19:44                 ` John W. Linville
2010-09-27 19:44                   ` John W. Linville
2010-09-27 20:18                   ` Ohad Ben-Cohen
2010-09-03  1:47 Stephen Rothwell
2010-09-03  1:47 ` Stephen Rothwell
2010-09-03  1:52 ` Stephen Rothwell
2010-09-03  1:52   ` Stephen Rothwell
2010-09-03  2:16   ` David Miller
2010-09-03  2:14 ` David Miller
2010-08-31  3:18 Stephen Rothwell
2010-08-31  3:18 ` Stephen Rothwell
2010-08-31  4:43 ` David Miller
2010-08-30  3:04 Stephen Rothwell
2010-08-30  3:04 ` Stephen Rothwell
2010-08-30  3:29 ` Simon Horman
2010-08-30  4:23   ` David Miller
2010-08-25  2:09 Stephen Rothwell
2010-08-25  2:09 ` Stephen Rothwell
2010-08-25  4:22 ` Rasesh Mody
2010-08-25  7:35   ` David Miller
2010-08-25 20:59     ` David Miller
2010-08-25 21:53       ` Rasesh Mody
2010-08-25 21:53         ` Rasesh Mody
2010-08-26  1:05       ` Stephen Rothwell
2010-08-23  3:27 Stephen Rothwell
2010-08-23  3:27 ` Stephen Rothwell
2010-08-23  3:31 ` David Miller
2010-07-29  4:13 Stephen Rothwell
2010-07-29  4:13 ` Stephen Rothwell
2010-07-29  5:21 ` David Miller
2010-04-27  5:25 Stephen Rothwell
2010-04-27  5:25 ` Stephen Rothwell
2010-04-27 16:34 ` David Miller
2010-04-27 17:18   ` David Miller
2010-04-28  1:11     ` Stephen Rothwell
2010-03-29  6:43 Stephen Rothwell
2010-03-29  6:43 ` Stephen Rothwell
2010-03-29  6:52 ` Eric Dumazet
2010-03-29  6:59   ` Eric Dumazet
2010-03-29  8:01     ` David Miller
2010-03-29  8:04       ` Stephen Rothwell
2010-03-29  7:01   ` Stephen Rothwell
2010-03-18  4:23 Stephen Rothwell
2010-03-18  4:23 ` Stephen Rothwell
2010-03-18  6:23 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.