• Zhu Yi's avatar
    [PATCH] ipw2200: Scale firmware loading watchdog with the firmware size · 397ae121
    Zhu Yi authored
    I can't really help with why restarts happen, but the following patch
    greatly increases the likelihood that a firmware reload will succeed
    afterward on my thinkpad. It addresses two issues. First, sysfs module
    loading and hotplug are asynchronous, and as such file operations on the
    "loading" and "data" files are racy when you load 2 firmwares in quick
    succession. Second, the timeout for DMAing the firmware needs to scale
    with the size of the firmware being loaded. That is, the watchdog needs
    to be on throughput, not on time alone.
    
    I no longer get the firmware load errors, though this is at best a hacky
    workaround for a racy interface. (Obviously, this does nothing to address
    the fatal errors in firmware which cause reloads; it just causes the
    initial loading and the reloads to work more often.)
    Signed-off-by: default avatarPeter Jones <pjones@redhat.com>
    Signed-off-by: default avatarBen M Cahill <ben.m.cahill@intel.com>
    Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    397ae121
ipw2200.c 306 KB