Created attachment 169066 [details] screenshot Hi folks, the nfe driver of FreeBSD 4.3 does some kind of up-down pingpong at boot time. DHCP is stuck in an endless loop. No login, unless I disconnect the ethernet cable . See the attached snapshot. Hardware is MCP79. (Booting without ACPI fails; the kernel panics very early at boot time with "panic: running without device atpic requires a local APIC".) Every helpful comment is highly appreciated. Regards Harri
PS: OpenBSD 5.9 does not show this problem.
I guess you're using FreeBSD 10.3(not 4.3R, right? Would you show me the output of dmesg(nfe(4) and its PHY driver only)? BTW, I think this is the first report on link flipping. Did it ever work on previous FreeBSD releases?
Created attachment 169159 [details] dmesg output Yes, 10.3 is correct. I am not sure where the 4.3 came from, sorry. I did not try 10.2 or older on this device (Acer R3600 Revo). The installer image (FreeBSD-10.3-RELEASE-amd64-memstick.img.xz) seems to work fine, but of course I booted it only twice by now. The problem comes up when I try to run the just installed system. dmesg output is attached.
PS: If I switch it off and wait a few minutes before turning it on again, then it seems to work.
Created attachment 169169 [details] nfe(4) link patch Thanks for the info. Does attached diff make any difference for you?
Do you have some step-1-2-3 guidelines how to clone the right source repository? Chapter 8 in the handbook doesn't tell, and the appendix A4 just explains how to install and use svn. Its not there :-(.
(In reply to Harri from comment #6) Did you install source code for kernel? If the answer is YES, you don't need to use svnlite to fetch kernel sources. If the answer is NO, you may have two options. 1. Install kernel sources from install media. 2. Use svnlite to fetch kernel sources(You don't need to install full-featured svn to get kernel sources). For svnlite, use the following repository. #cd /usr #svnlite co https://svn.FreeBSD.org/base/release/10.3.0 src After getting kernel sources do the following. #cd /usr/src #patch -p0 < /path-to-diff/nfe.link.diff # rebuild kernel and reboot
I didn't know the "https://svn.FreeBSD.org/base/release/10.3.0 src". Maybe it should be added to the wiki? I copied the GENERIC to CUSTOM, applied the patch and built a new kernel, as described in the handbook. After installing it and rebooting twice I still got the up-down-up-down, unfortunately. "uname -a" shows the expected "CUSTOM". AFAICT the nfe module is linked into the kernel, i.e. there is no chance for an old forgotten module file. /boot/kernel has only files created today. Sorry to say, but it seems to me the patch did not help.
(In reply to Harri from comment #8) Thank a lot for testing. Would you show me the output of 'devinfo -rv | rgephy'?
Sure: rgephy0 pnpinfo oui=0xe04c model=0x11 rev=0x2 at phyno=1 Hope this helps.
Created attachment 169285 [details] rgephy(4) link patch Thanks for the PHY information. I've attached a diff that modifies link handling of rgephy(4). Please revert previous diff(nfe.link.diff) and apply the new one(rgephy.link.diff) and let me know how it goes.
(In reply to Pyun YongHyeon from comment #11) Unfortunately there is no improvement.
(In reply to Harri from comment #12) Hmm, if you remove DHCP configuration in rc.conf and manually UP the interface without network configuration do you still see link UP/DOWN messages on console? For instance, remove ifconfig_nfe0="DHCP" in /etc/rc.conf and reboot your box. After logging in, try the following. #ifconfig up nfe0 And see whether you still see link change messages.
I have disabled IPv6 (SLAAC) in rc.conf. Now it doesn't get stuck at boot time anymore, as it seems. I still see the down-up-down-up, though. If I wait for DHCP to finish, then I can ifconfig nfe0 as expected, but it keeps on flipping as before. An explicit "ifconfig down; ifconfig up" does not help. If I boot without DHCP and SLAAC, then I get the same. Its still flipping. Of course I also tried different ports in my switch. No change. I had wiped out openBSD from this disk again, but booting Linux from USB stick the network seems to be fine.
(In reply to Harri from comment #14) It seems you still have some kind of network configuration. What I wanted was to get system booted without *ANY* network configuration(Uncommnet all network configuration in rc.conf). After boot with UTP cable plugged in, you would get just lo0 and nfe0 interfaces. Then do the dollowing. #ifconfig nfe0 This will show current nfe0 status. #ifconfig nfe0 up This will UP the interface without ANY network configuration. Wait 2 ~ 3 seconds and do: #ifconfig nfe0 This will show current interface status after UP command above. And watch you still see link flips. Let me know the out of three ifconfig outputs.
Created attachment 169443 [details] ifconfig output immediately after boot Both ifconfig_nfe0 and ifconfig_nfe0_ipv6 are commented out. After booting with the net cable plugged in the nfe0 interface was shown as "active". Link speed was 10mbit half-duplex. dmesg showed that the interface went up, too. The LEDs on my switch were off. See the attached output of ifconfig. After waiting a few minutes I ran "ifconfig nfe0 up". ifconfig showed "no carrier" for a few seconds, then it showed "active" and 1000mbit full duplex. The LEDs on my switch went on. No flipping. Using ifconfig I could configure a local IP address and copy /var/log/messages and the ifconfig output to another host to attach it here. If there is yet another option to disable nfe0, then I haven't found it.
Created attachment 169444 [details] /var/log/messages after manual "ifconfig nfe0 up"
Created attachment 169445 [details] ifconfig output after "ifconfig up" and manually configuring an IP address
(In reply to Harri from comment #16) Thanks all detailed output for each ifconfig. Because you don't see link flips in this configuration I started to think the link flips could be side effect of long link establishment time or other activities of network startup script. How about using synchronous mode of dhclient? For example, in rc.conf, ifconfig_nfe0="SYNCDHCP" This will make system wait until dhclient get a lease.
Nope, SYNCDHCP doesn't help. Its still flipping. Surely I can do a static IPv4 configuration of the interface. But as soon as I enable IPv6 autoconfiguration, it starts flipping again :-(. What about the ifconfig showing "active" and "10mbit", even though nobody set nfe0 to "up"? Doesn't this show that the interface isn't properly initialized or reset?
I tried 2 other switches: On both it worked fine. Even though there were 3 other hosts connected to the first switch, it seems to have a problem with the FreeBSD box. The new switches works for all. Thanx *very* much for all your effort and patience in this case. I highly appreciate that. Regards Harri
Good to know you narrowed down the issue. Thanks a lot.