summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thread.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-03-13 06:28:52 +0000
committeradrian <adrian@FreeBSD.org>2012-03-13 06:28:52 +0000
commita7180c207d84ff97a6de5317a6ac48b9c22cffa4 (patch)
tree402e0ee915c14e4780e8d7483583aa61dfd22105 /sys/kern/kern_thread.c
parent99b3b3eed925c8cfdfcc91d4866480e55e62b38a (diff)
downloadFreeBSD-src-a7180c207d84ff97a6de5317a6ac48b9c22cffa4.zip
FreeBSD-src-a7180c207d84ff97a6de5317a6ac48b9c22cffa4.tar.gz
Fix link status handling on if_arge upon system boot to allow bootp/NFS to
function. From the submitter: This patch fixes an issue I encountered using an NFS root with an ar71xx-based MikroTik RouterBoard 450G on -current where the kernel fails to contact a DHCP/BOOTP server via if_arge when it otherwise should be able to. This may be the same issue that Monthadar Al Jaberi reported against an RSPRO on 6 March, as the signature is the same: %%% DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 . . . DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 arge0: initialization failed: no memory for rx buffers DHCP/BOOTP timeout for server 255.255.255.255 arge0: initialization failed: no memory for rx buffers %%% The primary issue that I found is that the DHCP/BOOTP message that bootpc_call() is sending never makes it onto the wire, which I believe is due to the following: - Last December, a change was made to the ifioctl that bootpc_call() uses to adjust the netmask around the sosend(). - The new ioctl (SIOCAIFADDR) performs an if_init when invoked, whereas the old one (SIOCSIFNETMASK) did not. - if_arge maintains its own sense of link state in sc->arge_link_status. - On a single-phy interface, sc->arge_link_status is initialized to 0 in arge_init_locked(). - sc->arge_link_status remains 0 until a phy state change notification causes arge_link_task to run, notice the link is up, and set it to 1. - The inits caused by the ifioctls in bootpc_call are reinitializing the interface, but not the phy, so sc->arge_link_status goes to 0 and remains there. - arge_start_locked() always sees sc->arge_link_status == 0 and returns without queuing anything. The attached patch changes arge_init_locked() such that in the single-phy case, instead of initializing sc->arge_link_status to 0, it runs arge_link_task() to set it according to the current phy state. This change has allowed my setup to mount an NFS root successfully. Submitted by: Patrick Kelsey <kelsey@ieee.org> Reviewed by: juli
Diffstat (limited to 'sys/kern/kern_thread.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud