• Ming Lei's avatar
    firmware loader: simplify pages ownership transfer · 65710cb6
    Ming Lei authored
    This patch doesn't transfer ownership of pages' buffer to the
    instance of firmware until the firmware loading is completed,
    which will simplify firmware_loading_store a lot, so help
    to introduce the following cache_firmware and uncache_firmware
    mechanism during system suspend-resume cycle.
    
    In fact, this patch fixes one bug: if writing data into
    firmware loader device is bypassed between writting 1 and 0 to
    'loading', OOPS will be triggered without the patch.
    
    Also handle the vmap failure case, and add some comments to make
    code more readable.
    Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    65710cb6
firmware_class.c 18 KB