Skip to content
  • Takashi Iwai's avatar
    firmware: Introduce request_firmware_direct() · bba3a87e
    Takashi Iwai authored
    
    
    When CONFIG_FW_LOADER_USER_HELPER is set, request_firmware() falls
    back to the usermode helper for loading via udev when the direct
    loading fails.  But the recent udev takes way too long timeout (60
    seconds) for non-existing firmware.  This is unacceptable for the
    drivers like microcode loader where they load firmwares optionally,
    i.e. it's no error even if no requested file exists.
    
    This patch provides a new helper function, request_firmware_direct().
    It behaves as same as request_firmware() except for that it doesn't
    fall back to usermode helper but returns an error immediately if the
    f/w can't be loaded directly in kernel.
    
    Without CONFIG_FW_LOADER_USER_HELPER=y, request_firmware_direct() is
    just an alias of request_firmware(), due to obvious reason.
    
    Tested-by: default avatarPrarit Bhargava <prarit@redhat.com>
    Acked-by: default avatarMing Lei <ming.lei@canonical.com>
    Acked-by: default avatarBorislav Petkov <bp@suse.de>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    bba3a87e