All of lore.kernel.org
 help / color / mirror / Atom feed
* tg3 and Broadcom PHY driver
@ 2009-09-26 21:32 Felix Radensky
  2009-09-28 20:52 ` Matt Carlson
  0 siblings, 1 reply; 8+ messages in thread
From: Felix Radensky @ 2009-09-26 21:32 UTC (permalink / raw)
  To: netdev

Hi,

I've noticed that in linux-2.6.31 I have to make tg3 driver modular, due to
its dependency on Broadcom PHY driver. If both tg3 and PHY driver are
compiled into the kernel, tg3 fails to detect a PHY, apparently because PHY
driver is loaded later. I'm using BCM57760 on embedded powerpc platform
(MPC8536).

How can I make tg3 work when it's compiled into the kernel ?

Thanks.

Felix.

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

* Re: tg3 and Broadcom PHY driver
  2009-09-26 21:32 tg3 and Broadcom PHY driver Felix Radensky
@ 2009-09-28 20:52 ` Matt Carlson
  2009-09-28 20:53   ` Felix Radensky
  0 siblings, 1 reply; 8+ messages in thread
From: Matt Carlson @ 2009-09-28 20:52 UTC (permalink / raw)
  To: Felix Radensky; +Cc: netdev

On Sat, Sep 26, 2009 at 02:32:18PM -0700, Felix Radensky wrote:
> Hi,
> 
> I've noticed that in linux-2.6.31 I have to make tg3 driver modular, due to
> its dependency on Broadcom PHY driver. If both tg3 and PHY driver are
> compiled into the kernel, tg3 fails to detect a PHY, apparently because PHY
> driver is loaded later. I'm using BCM57760 on embedded powerpc platform
> (MPC8536).
> 
> How can I make tg3 work when it's compiled into the kernel ?
> 
> Thanks.

Is the broadcom module also compiled into the kernel?


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

* Re: tg3 and Broadcom PHY driver
  2009-09-28 20:52 ` Matt Carlson
@ 2009-09-28 20:53   ` Felix Radensky
  2009-09-28 21:15     ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Felix Radensky @ 2009-09-28 20:53 UTC (permalink / raw)
  To: Matt Carlson; +Cc: netdev

Hi, Matt

Matt Carlson wrote:
> On Sat, Sep 26, 2009 at 02:32:18PM -0700, Felix Radensky wrote:
>   
>> Hi,
>>
>> I've noticed that in linux-2.6.31 I have to make tg3 driver modular, due to
>> its dependency on Broadcom PHY driver. If both tg3 and PHY driver are
>> compiled into the kernel, tg3 fails to detect a PHY, apparently because PHY
>> driver is loaded later. I'm using BCM57760 on embedded powerpc platform
>> (MPC8536).
>>
>> How can I make tg3 work when it's compiled into the kernel ?
>>
>> Thanks.
>>     
>
> Is the broadcom module also compiled into the kernel?
>
>   
Yes.

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

* Re: tg3 and Broadcom PHY driver
  2009-09-28 20:53   ` Felix Radensky
@ 2009-09-28 21:15     ` David Miller
  2009-09-28 21:52       ` Felix Radensky
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2009-09-28 21:15 UTC (permalink / raw)
  To: felix; +Cc: mcarlson, netdev

From: Felix Radensky <felix@embedded-sol.com>
Date: Mon, 28 Sep 2009 22:53:15 +0200

> Hi, Matt
> 
> Matt Carlson wrote:
>> On Sat, Sep 26, 2009 at 02:32:18PM -0700, Felix Radensky wrote:
>>   
>> Is the broadcom module also compiled into the kernel?
>>
>>   
> Yes.

I bet this is all because the tg3 driver is linked into the kernel
before the PHY layer and drivers subdirectory or something like that.

Link order determines the order in which built-in initializations
occur (within the same init type).

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

* Re: tg3 and Broadcom PHY driver
  2009-09-28 21:15     ` David Miller
@ 2009-09-28 21:52       ` Felix Radensky
  2009-09-28 21:55         ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Felix Radensky @ 2009-09-28 21:52 UTC (permalink / raw)
  To: David Miller; +Cc: mcarlson, netdev

Hi, David
David Miller wrote:
> From: Felix Radensky <felix@embedded-sol.com>
> Date: Mon, 28 Sep 2009 22:53:15 +0200
>
>   
>> Hi, Matt
>>
>> Matt Carlson wrote:
>>     
>>> On Sat, Sep 26, 2009 at 02:32:18PM -0700, Felix Radensky wrote:
>>>   
>>> Is the broadcom module also compiled into the kernel?
>>>
>>>   
>>>       
>> Yes.
>>     
>
> I bet this is all because the tg3 driver is linked into the kernel
> before the PHY layer and drivers subdirectory or something like that.
>
> Link order determines the order in which built-in initializations
> occur (within the same init type).
>   

Yes, moving CONFIG_TIGON3 right after CONFIG_PHYLIB in drivers/net/Makefile
fixes the problem for me.

Thanks a lot.

Felix.


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

* Re: tg3 and Broadcom PHY driver
  2009-09-28 21:52       ` Felix Radensky
@ 2009-09-28 21:55         ` David Miller
  2009-09-29  0:53           ` Ben Hutchings
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2009-09-28 21:55 UTC (permalink / raw)
  To: felix; +Cc: mcarlson, netdev

From: Felix Radensky <felix@embedded-sol.com>
Date: Mon, 28 Sep 2009 23:52:54 +0200

> Yes, moving CONFIG_TIGON3 right after CONFIG_PHYLIB in
> drivers/net/Makefile fixes the problem for me.

Thanks for testing.

We really need to fix this generically.

Does anyone think that moving the MDIO/MII/PHY layer objects
to the top of drivers/net/Makefile will break anything?

If not, that's what we should do I think.

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

* Re: tg3 and Broadcom PHY driver
  2009-09-28 21:55         ` David Miller
@ 2009-09-29  0:53           ` Ben Hutchings
  2009-10-09 21:25             ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Ben Hutchings @ 2009-09-29  0:53 UTC (permalink / raw)
  To: David Miller; +Cc: felix, mcarlson, netdev

On Mon, 2009-09-28 at 14:55 -0700, David Miller wrote:
> From: Felix Radensky <felix@embedded-sol.com>
> Date: Mon, 28 Sep 2009 23:52:54 +0200
> 
> > Yes, moving CONFIG_TIGON3 right after CONFIG_PHYLIB in
> > drivers/net/Makefile fixes the problem for me.
> 
> Thanks for testing.
> 
> We really need to fix this generically.
> 
> Does anyone think that moving the MDIO/MII/PHY layer objects
> to the top of drivers/net/Makefile will break anything?
> 
> If not, that's what we should do I think.

Only the phylib drivers actually need to be moved to fix the
initialisation order, but moving the others shouldn't hurt.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


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

* Re: tg3 and Broadcom PHY driver
  2009-09-29  0:53           ` Ben Hutchings
@ 2009-10-09 21:25             ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2009-10-09 21:25 UTC (permalink / raw)
  To: bhutchings; +Cc: felix, mcarlson, netdev

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Tue, 29 Sep 2009 01:53:59 +0100

> On Mon, 2009-09-28 at 14:55 -0700, David Miller wrote:
>> From: Felix Radensky <felix@embedded-sol.com>
>> Date: Mon, 28 Sep 2009 23:52:54 +0200
>> 
>> > Yes, moving CONFIG_TIGON3 right after CONFIG_PHYLIB in
>> > drivers/net/Makefile fixes the problem for me.
>> 
>> Thanks for testing.
>> 
>> We really need to fix this generically.
>> 
>> Does anyone think that moving the MDIO/MII/PHY layer objects
>> to the top of drivers/net/Makefile will break anything?
>> 
>> If not, that's what we should do I think.
> 
> Only the phylib drivers actually need to be moved to fix the
> initialisation order, but moving the others shouldn't hurt.

Ok, I'm adding the following to net-2.6 to resolve this and
will queue it up for -stable too.

Thanks everyone.

net: Link in PHY drivers before others.

We need PHY drivers to initialize in a static kernel before
the MAC drivers that use them.  So link them in first.

Based upon a report by Felix Radensky.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/Makefile |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index d866b8c..48d82e9 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -2,6 +2,10 @@
 # Makefile for the Linux network (ethercard) device drivers.
 #
 
+obj-$(CONFIG_MII) += mii.o
+obj-$(CONFIG_MDIO) += mdio.o
+obj-$(CONFIG_PHYLIB) += phy/
+
 obj-$(CONFIG_TI_DAVINCI_EMAC) += davinci_emac.o
 
 obj-$(CONFIG_E1000) += e1000/
@@ -100,10 +104,6 @@ obj-$(CONFIG_SH_ETH) += sh_eth.o
 # end link order section
 #
 
-obj-$(CONFIG_MII) += mii.o
-obj-$(CONFIG_MDIO) += mdio.o
-obj-$(CONFIG_PHYLIB) += phy/
-
 obj-$(CONFIG_SUNDANCE) += sundance.o
 obj-$(CONFIG_HAMACHI) += hamachi.o
 obj-$(CONFIG_NET) += Space.o loopback.o
-- 
1.6.4.4


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

end of thread, other threads:[~2009-10-09 21:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-26 21:32 tg3 and Broadcom PHY driver Felix Radensky
2009-09-28 20:52 ` Matt Carlson
2009-09-28 20:53   ` Felix Radensky
2009-09-28 21:15     ` David Miller
2009-09-28 21:52       ` Felix Radensky
2009-09-28 21:55         ` David Miller
2009-09-29  0:53           ` Ben Hutchings
2009-10-09 21:25             ` 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.