a7180c207d
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 |
||
---|---|---|
.. | ||
apb.c | ||
apbvar.h | ||
ar71xx_bus_space_reversed.c | ||
ar71xx_bus_space_reversed.h | ||
ar71xx_chip.c | ||
ar71xx_chip.h | ||
ar71xx_cpudef.h | ||
ar71xx_ehci.c | ||
ar71xx_gpio.c | ||
ar71xx_gpiovar.h | ||
ar71xx_machdep.c | ||
ar71xx_ohci.c | ||
ar71xx_pci_bus_space.c | ||
ar71xx_pci_bus_space.h | ||
ar71xx_pci.c | ||
ar71xx_setup.c | ||
ar71xx_setup.h | ||
ar71xx_spi.c | ||
ar71xx_wdog.c | ||
ar71xxreg.h | ||
ar91xx_chip.c | ||
ar91xx_chip.h | ||
ar91xxreg.h | ||
ar724x_chip.c | ||
ar724x_chip.h | ||
ar724x_pci.c | ||
ar724xreg.h | ||
files.ar71xx | ||
if_arge.c | ||
if_argevar.h | ||
pcf2123_rtc.c | ||
pcf2123reg.h | ||
std.ar71xx | ||
uart_bus_ar71xx.c | ||
uart_cpu_ar71xx.c |