[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: boot loader not working after reboot host - more info
In our case, the auto negotiate problems were immense.
We are using an Intel Phy chip but the problems may be related to the Broadcom
On the Intel, bit 12 (auto-negotiate enable) of the MII Control Register is set
to 0 on power up. I'm not sure about the Broadcom 5201 (the 5221 spec says it's
a 1 on powerup). We changed ethernet.c to set this bit to 1 also when it does a
renegotiate (bit 9).
This doesn't help for boot up so we modified the sbl to look for ACK's properly.
In fact, I think this code was commented out. Packets are being dropped and the
client never ACK's. The server code sends each packet once, never gets the ACK
and then just waits.
Instead the server needs to send the packet again after a reasonable timeout. I
don't think it hurts to send the same packet even after it's been ACK'd. They
all have sequence numbers and the client ignores repeated packets.
Before we made these changes, our network boot success was about 1 in 20 after
Mikael Starvik wrote:
> Yes, this is the same theory as I have. The easiest way to avoid
> this problem is to add a hub.
> -----Original Message-----
> From: email@example.com]On">mailto:firstname.lastname@example.org]On
> Behalf Of Jarkko Tuomi
> Sent: Monday, November 25, 2002 12:53 PM
> To: Dave Rovner; dev-etrax
> Subject: Re: boot loader not working after reboot host - more info
> This might have something to do with network full/half duplex setting.
> The settings of the MAC (inside Etrax) and PHY (chip next to it) must match.
> Usually this works so that the PHY does autonegotiation with the link
> partner. The kernel driver reads the PHY full/half flag every five seconds,
> and updates the setting of the MAC.
> Now the boot code doesn't know how to read the required information from the
> PHY, so it sets half duplex just to be sure. When the board is connected to
> a hub, PHY negotiates half duplex and everything is fine. When connected to
> a switch or straight to a PC network card, most PHYs negotiate full duplex,
> presumable also the one on the devboard LX.
> Mismatch in the settings leads to all kinds of strange network problems. For
> example our board refused to work in the boot mode when connected to a
> switch. We then changed the microcontroller code that turns the PHY on in
> the first place to force half duplex, and now everything works fine.
> Unfortunately the devboard doens't have this possibility.
> Some network drivers (at least old 3com cards) do autonegotiation only when
> the driver is loaded. It's possible that the settings of the PC network card
> depend on what is connected at the boot time. My guess is that if the
> connector is empty, it chooses half duplex, if the devboard is connected, it
> chooses full duplex.
> I suggest one of the following:
> -try to boot the PC with the network cable disconnected
> -restrict the PC network card advertised capabilities to half duplex (at
> least the Debian package mii-diag can do this)
> -get a hub
> -force the devboard PHY to half duplex
> Hopefully this helps,