Late Broadcom link detection makes IP config (bootp) fail

12 messages, 4 authors, 2001-10-22 · open the first message on its own page

Late Broadcom link detection makes IP config (bootp) fail

From: Michael Clark <hidden>
Date: 2001-10-22 02:31:49

Hi,

I just compiled up 2.4.13-pres-benh0 and am trying to netboot my iMac.
I am using the following commandline:

     ip=bootp nfsroot=10.1.0.7:/nb/root,rw

The boot messages show that the broadcom is found:

     eth0: Found broadcom BCM5201 PHY

IP-Config initialises but doesn't send any request as I suspect the link
on eth0 is down. Root NFS then runs and fails due to network being down.

Later in the logs after unable to mount root kernel panic I see:

     eth0:    Link up ! BCM5201/5221 aux_stat: 0x003e
     eth0:    Full duplex: 0, Speed: 100

Why does the eth0 link come up so late? Is it possible to make the
broadcom driver wait for link before returning from the initialisation
function?

~mc


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Tom Rini <hidden>
Date: 2001-10-22 02:57:58

On Mon, Oct 22, 2001 at 10:31:49AM +0800, Michael Clark wrote:
I just compiled up 2.4.13-pres-benh0 and am trying to netboot my iMac.
I am using the following commandline:
[snip]
The boot messages show that the broadcom is found:
[snip]
Why does the eth0 link come up so late? Is it possible to make the
broadcom driver wait for link before returning from the initialisation
function?
What driver did you use?

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Michael Clark <hidden>
Date: 2001-10-22 03:17:23

Tom Rini wrote:
On Mon, Oct 22, 2001 at 10:31:49AM +0800, Michael Clark wrote:
[snip]
quoted
Why does the eth0 link come up so late? Is it possible to make the
broadcom driver wait for link before returning from the initialisation
function?
What driver did you use?

Not exactly sure: I have MACE, BMAC and GMAC compiled in. After matching
the log messages to the dirver source, it looks like GMAC.

~mc


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Michael Clark <hidden>
Date: 2001-10-22 03:24:22

Tom Rini wrote:
On Mon, Oct 22, 2001 at 10:31:49AM +0800, Michael Clark wrote:
[snip]
quoted
Why does the eth0 link come up so late? Is it possible to make the
broadcom driver wait for link before returning from the initialisation
function?
What driver did you use?

Okay, changed to BMAC and it works okay - should BMAC detection come
before GMAC?

~mc


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Tom Rini <hidden>
Date: 2001-10-22 03:28:13

On Mon, Oct 22, 2001 at 11:17:23AM +0800, Michael Clark wrote:
Tom Rini wrote:
quoted
On Mon, Oct 22, 2001 at 10:31:49AM +0800, Michael Clark wrote:
quoted
quoted
Why does the eth0 link come up so late? Is it possible to make the
broadcom driver wait for link before returning from the initialisation
function?
What driver did you use?
Not exactly sure: I have MACE, BMAC and GMAC compiled in. After matching
the log messages to the dirver source, it looks like GMAC.
If you're using _devel or benh's tree, turn those off and try sungem.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Tom Rini <hidden>
Date: 2001-10-22 03:28:43

On Mon, Oct 22, 2001 at 11:24:22AM +0800, Michael Clark wrote:
Tom Rini wrote:
quoted
On Mon, Oct 22, 2001 at 10:31:49AM +0800, Michael Clark wrote:
[snip]
quoted
quoted
Why does the eth0 link come up so late? Is it possible to make the
broadcom driver wait for link before returning from the initialisation
function?
Okay, changed to BMAC and it works okay - should BMAC detection come
before GMAC?
Er, say again?  And ignore what I just sent out (got confused fer a
second).

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Michael Clark <hidden>
Date: 2001-10-22 04:31:12

Tom Rini wrote:
On Mon, Oct 22, 2001 at 11:24:22AM +0800, Michael Clark wrote:
[snip]
quoted
Okay, changed to BMAC and it works okay - should BMAC detection come
before GMAC?
Er, say again?  And ignore what I just sent out (got confused fer a
second).

It seems that GMAC and BMAC support some common hardware. What I was
suggesting is whether BMAC should be linked earlier so it's init
function runs before GMAC. Although I release this is not necessarily a
real solution for what may be a bug in GMAC (just means I and up using
BMAC which works and allows me to have both compiled in).

Some of GMAC initialisation seems to be delayed and done asynchronously.
Shouldn't link be detected and the interface brought up before return
from the init function? Otherwise it is impossible to use this driver
with IP autoconfig and NFS root.

~mc


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2001-10-22 13:16:36

Okay, changed to BMAC and it works okay - should BMAC detection come
before GMAC?
There is no way bmac would replace gmac, those are different drivers
for different chips.

The time it takes for the phy to negociate is nothing I can do about.
It's probably an ipconfig design bug not to wait long enough here :)

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2001-10-22 13:17:35

Some of GMAC initialisation seems to be delayed and done asynchronously.
Shouldn't link be detected and the interface brought up before return
from the init function? Otherwise it is impossible to use this driver
with IP autoconfig and NFS root.
It's not supposed to be synchronous. It's ipconfig's fault not to wait
long enough.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Tom Rini <hidden>
Date: 2001-10-22 15:41:48

On Mon, Oct 22, 2001 at 03:16:36PM +0200, Benjamin Herrenschmidt wrote:
quoted
Okay, changed to BMAC and it works okay - should BMAC detection come
before GMAC?
There is no way bmac would replace gmac, those are different drivers
for different chips.
But would bmac ever try and init some gmac hw?  That's sort of what it
sounded like Michael was saying.  But anyhow, gmac and bmac use the
module_init bits and thus there's no way to enforce ordering of init.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2001-10-22 15:46:55

On Mon, 22 Oct 2001, Tom Rini wrote:
On Mon, Oct 22, 2001 at 03:16:36PM +0200, Benjamin Herrenschmidt wrote:
quoted
quoted
Okay, changed to BMAC and it works okay - should BMAC detection come
before GMAC?
There is no way bmac would replace gmac, those are different drivers
for different chips.
But would bmac ever try and init some gmac hw?  That's sort of what it
sounded like Michael was saying.  But anyhow, gmac and bmac use the
module_init bits and thus there's no way to enforce ordering of init.
... except for changing the order in the Makefile.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Late Broadcom link detection makes IP config (bootp) fail

From: Michael Clark <hidden>
Date: 2001-10-22 16:42:21

Tom Rini wrote:
On Mon, Oct 22, 2001 at 03:16:36PM +0200, Benjamin Herrenschmidt wrote:
quoted
quoted
Okay, changed to BMAC and it works okay - should BMAC detection come
before GMAC?
There is no way bmac would replace gmac, those are different drivers
for different chips.
But would bmac ever try and init some gmac hw?  That's sort of what it
sounded like Michael was saying.  But anyhow, gmac and bmac use the
module_init bits and thus there's no way to enforce ordering of init.

My apologies. I had been using gmac all along but it appears to be an
intermittent problem. Sometimes the interface comes up in time for IP
autoconfig and sometimes not. I'll go have a look at the IP config code
to see if get it to wait a while for the interface to come up.

Here's a successful (garbled) log where the link came up just in time (i
can't capture the failed log as I don't have a serial port on my iMac).

eth0: PHY ID: 0x00406212
eth0: Found Broadcom BCM5201 PHY
Sending BOOTP requests .<6>eth0: Link state change, phy_status: 0x782d
eth0:    Link up ! BCM5201/5221 aux_stat: 0x003e
eth0:    Full Duplex: 0, Speed: 100
. OK
IP-Config: Got BOOTP answer from 10.1.0.4, my address is 10.1.0.42
IP-Config: Complete:
       device=eth0, addr=10.1.0.42, mask=255.255.0.0, gw=10.1.0.254,
      host=10.1.0.42, domain=, nis-domain=(none),
      bootserver=10.1.0.4, rootserver=10.1.0.7, rootpath=/nb/root

~mc


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help