• Ming Lei's avatar
    firmware loader: let caching firmware piggyback on loading firmware · ac39b3ea
    Ming Lei authored
    After starting caching firmware, there is still some time left
    before devices are suspended, during the period, request_firmware
    or its nowait version may still be triggered by the below situations
    to load firmware images which can't be cached during suspend/resume
    cycle.
    
    	- new devices added
    	- driver bind
    	- or device open kind of things
    
    This patch utilizes the piggyback trick to cache firmware for
    this kind of situation: just increase the firmware buf's reference
    count and add the fw name entry into cache entry list after starting
    caching firmware and before syscore_suspend() is called.
    Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    ac39b3ea
firmware_class.c 31.4 KB