• Alan Jenkins's avatar
    eeepc-laptop: fix pci hotplug race on load and unload · 07e84aa9
    Alan Jenkins authored
    Wifi rfkill state changes can race with pci hotplug cleanup.  A simple
    fix is to refresh the hotplug state just before deregistering the pci
    hotplug slot.
    
    There is also potential for a hotplug notification to fire too early
    during setup, while the structures it uses are still being initialised.
    (This could only happen if the BIOS performs hotplug itself; a bug
    triggered by removing the battery while hibernated).  Avoid this by
    registering the notifier later.  The same refresh mechanism is used
    to handle rfkill state changes which can now race with registration.
    Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
    Signed-off-by: default avatarCorentin Chary <corentincj@iksaif.net>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    07e84aa9
eeepc-laptop.c 28.8 KB