mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacld-3.0: Retry if request_firmware returns EAGAIN
Loading driver is fail because request_firmware returns EAGAIN when it invokes usermodehelper_read_trylock during system suspend happens. Though system suspend is aborted, it hasn't invoked usermodehelper_enable yet. To resolve this issue, retry again to check whether usermodehelper_enable has done. Change-Id: I80f95c2194039a67adbc463a32bfc0a15e68484b CRs-Fixed: 2251604
This commit is contained in:
parent
1687e16c01
commit
8bbbcdf465
2 changed files with 16 additions and 2 deletions
|
|
@ -346,6 +346,9 @@ static inline bool in_compat_syscall(void) { return is_compat_task(); }
|
|||
#define HDD_MOD_EXIT_SSR_MAX_RETRIES 75
|
||||
#endif
|
||||
|
||||
#define HDD_CFG_REQUEST_FIRMWARE_RETRIES (3)
|
||||
#define HDD_CFG_REQUEST_FIRMWARE_DELAY (20)
|
||||
|
||||
#define MAX_USER_COMMAND_SIZE 4096
|
||||
#define DNS_DOMAIN_NAME_MAX_LEN 255
|
||||
#define ICMPv6_ADDR_LEN 16
|
||||
|
|
|
|||
|
|
@ -7520,7 +7520,9 @@ static void hdd_set_rx_mode_value(struct hdd_context *hdd_ctx)
|
|||
*/
|
||||
QDF_STATUS hdd_parse_config_ini(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
int status, i = 0;
|
||||
int status = 0;
|
||||
int i = 0;
|
||||
int retry = 0;
|
||||
/** Pointer for firmware image data */
|
||||
const struct firmware *fw = NULL;
|
||||
char *buffer, *line, *pTemp = NULL;
|
||||
|
|
@ -7532,7 +7534,16 @@ QDF_STATUS hdd_parse_config_ini(struct hdd_context *hdd_ctx)
|
|||
|
||||
memset(cfgIniTable, 0, sizeof(cfgIniTable));
|
||||
|
||||
status = request_firmware(&fw, WLAN_INI_FILE, hdd_ctx->parent_dev);
|
||||
do {
|
||||
if (status == -EAGAIN)
|
||||
msleep(HDD_CFG_REQUEST_FIRMWARE_DELAY);
|
||||
|
||||
status = request_firmware(&fw, WLAN_INI_FILE,
|
||||
hdd_ctx->parent_dev);
|
||||
|
||||
retry++;
|
||||
} while ((retry < HDD_CFG_REQUEST_FIRMWARE_RETRIES) &&
|
||||
(status == -EAGAIN));
|
||||
|
||||
if (status) {
|
||||
hdd_alert("request_firmware failed %d", status);
|
||||
|
|
|
|||
Loading…
Reference in a new issue