linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Late Broadcom link detection makes IP config (bootp) fail
@ 2001-10-22  2:31 Michael Clark
  2001-10-22  2:57 ` Tom Rini
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Clark @ 2001-10-22  2:31 UTC (permalink / raw)
  To: linuxppc-dev


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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22  2:31 Late Broadcom link detection makes IP config (bootp) fail Michael Clark
@ 2001-10-22  2:57 ` Tom Rini
  2001-10-22  3:17   ` Michael Clark
  2001-10-22  3:24   ` Michael Clark
  0 siblings, 2 replies; 12+ messages in thread
From: Tom Rini @ 2001-10-22  2:57 UTC (permalink / raw)
  To: Michael Clark; +Cc: linuxppc-dev


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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22  2:57 ` Tom Rini
@ 2001-10-22  3:17   ` Michael Clark
  2001-10-22  3:28     ` Tom Rini
  2001-10-22  3:24   ` Michael Clark
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Clark @ 2001-10-22  3:17 UTC (permalink / raw)
  To: Tom Rini; +Cc: linuxppc-dev


Tom Rini wrote:

> On Mon, Oct 22, 2001 at 10:31:49AM +0800, Michael Clark wrote:

[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?


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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22  2:57 ` Tom Rini
  2001-10-22  3:17   ` Michael Clark
@ 2001-10-22  3:24   ` Michael Clark
  2001-10-22  3:28     ` Tom Rini
  2001-10-22 13:16     ` Benjamin Herrenschmidt
  1 sibling, 2 replies; 12+ messages in thread
From: Michael Clark @ 2001-10-22  3:24 UTC (permalink / raw)
  To: Tom Rini; +Cc: linuxppc-dev


Tom Rini wrote:

> On Mon, Oct 22, 2001 at 10:31:49AM +0800, Michael Clark wrote:
[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?


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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22  3:17   ` Michael Clark
@ 2001-10-22  3:28     ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2001-10-22  3:28 UTC (permalink / raw)
  To: Michael Clark; +Cc: linuxppc-dev


On Mon, Oct 22, 2001 at 11:17:23AM +0800, Michael Clark wrote:
> Tom Rini wrote:
>
> >On Mon, Oct 22, 2001 at 10:31:49AM +0800, Michael Clark wrote:
>
> >>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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22  3:24   ` Michael Clark
@ 2001-10-22  3:28     ` Tom Rini
  2001-10-22  4:31       ` Michael Clark
  2001-10-22 13:16     ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 12+ messages in thread
From: Tom Rini @ 2001-10-22  3:28 UTC (permalink / raw)
  To: Michael Clark; +Cc: linuxppc-dev


On Mon, Oct 22, 2001 at 11:24:22AM +0800, Michael Clark wrote:
> Tom Rini wrote:
>
> >On Mon, Oct 22, 2001 at 10:31:49AM +0800, Michael Clark wrote:
> [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?
>
> 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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22  3:28     ` Tom Rini
@ 2001-10-22  4:31       ` Michael Clark
  2001-10-22 13:17         ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Clark @ 2001-10-22  4:31 UTC (permalink / raw)
  To: Tom Rini; +Cc: linuxppc-dev


Tom Rini wrote:

> On Mon, Oct 22, 2001 at 11:24:22AM +0800, Michael Clark wrote:
[snip]
>>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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22  3:24   ` Michael Clark
  2001-10-22  3:28     ` Tom Rini
@ 2001-10-22 13:16     ` Benjamin Herrenschmidt
  2001-10-22 15:41       ` Tom Rini
  1 sibling, 1 reply; 12+ messages in thread
From: Benjamin Herrenschmidt @ 2001-10-22 13:16 UTC (permalink / raw)
  To: Michael Clark, linuxppc-dev, Tom Rini


>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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22  4:31       ` Michael Clark
@ 2001-10-22 13:17         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 12+ messages in thread
From: Benjamin Herrenschmidt @ 2001-10-22 13:17 UTC (permalink / raw)
  To: Michael Clark, Tom Rini, linuxppc-dev


>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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22 13:16     ` Benjamin Herrenschmidt
@ 2001-10-22 15:41       ` Tom Rini
  2001-10-22 15:46         ` Geert Uytterhoeven
  2001-10-22 16:42         ` Michael Clark
  0 siblings, 2 replies; 12+ messages in thread
From: Tom Rini @ 2001-10-22 15:41 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Michael Clark, linuxppc-dev


On Mon, Oct 22, 2001 at 03:16:36PM +0200, Benjamin Herrenschmidt wrote:
> >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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22 15:41       ` Tom Rini
@ 2001-10-22 15:46         ` Geert Uytterhoeven
  2001-10-22 16:42         ` Michael Clark
  1 sibling, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2001-10-22 15:46 UTC (permalink / raw)
  To: Tom Rini; +Cc: Benjamin Herrenschmidt, Michael Clark, linuxppc-dev


On Mon, 22 Oct 2001, Tom Rini wrote:
> On Mon, Oct 22, 2001 at 03:16:36PM +0200, Benjamin Herrenschmidt wrote:
> > >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/

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

* Re: Late Broadcom link detection makes IP config (bootp) fail
  2001-10-22 15:41       ` Tom Rini
  2001-10-22 15:46         ` Geert Uytterhoeven
@ 2001-10-22 16:42         ` Michael Clark
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Clark @ 2001-10-22 16:42 UTC (permalink / raw)
  To: Tom Rini; +Cc: Benjamin Herrenschmidt, linuxppc-dev


Tom Rini wrote:

> On Mon, Oct 22, 2001 at 03:16:36PM +0200, Benjamin Herrenschmidt wrote:
>
>>>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/

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

end of thread, other threads:[~2001-10-22 16:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-22  2:31 Late Broadcom link detection makes IP config (bootp) fail Michael Clark
2001-10-22  2:57 ` Tom Rini
2001-10-22  3:17   ` Michael Clark
2001-10-22  3:28     ` Tom Rini
2001-10-22  3:24   ` Michael Clark
2001-10-22  3:28     ` Tom Rini
2001-10-22  4:31       ` Michael Clark
2001-10-22 13:17         ` Benjamin Herrenschmidt
2001-10-22 13:16     ` Benjamin Herrenschmidt
2001-10-22 15:41       ` Tom Rini
2001-10-22 15:46         ` Geert Uytterhoeven
2001-10-22 16:42         ` Michael Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).