mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
cnss2: Fix 60s timeout while search regdb.bin failure
Since for the Genoa or the SP that doesn't need
regdb.bin for Hasting, it should happen search
regdb.bin failure issue that cause 60s timeout.
So add one compile macro CNSS_REQ_FW_DIRECT to
replace request_firmware_direct with request_
firmware for regdb.bin and only search the folder
that set by fw_path, which can avoid 60s timeout
while search file failure in the user space.
static const char * const fw_path[] = {
fw_path_para,
"/lib/firmware/updates/" UTS_RELEASE,
"/lib/firmware/updates",
"/lib/firmware/" UTS_RELEASE,
"/lib/firmware"
};
Above piece of code is the definition of fw_path
from drivers/base/firmware_loader/main.c.
Change-Id: I79c2fce33a8befecb0242a70b7eee1eef9a76e9b
Signed-off-by: Chaoli Zhou <zchaoli@codeaurora.org>
Signed-off-by: Kuichu Ni <kuichun@codeaurora.org>
This commit is contained in:
parent
d00e6c6b34
commit
75e8fd3e51
4 changed files with 32 additions and 3 deletions
|
|
@ -96,3 +96,11 @@ config CNSS_WCN7850
|
|||
CNSS WCN7850 chipset.
|
||||
These changes are needed to support the new hardware architecture
|
||||
for CNSS WCN7850 chipset.
|
||||
|
||||
config CNSS_REQ_FW_DIRECT
|
||||
bool "Enable request_firmware_direct for firmware or configuration file"
|
||||
depends on CNSS2
|
||||
help
|
||||
This enables calling request_firmware_direct for firmware or
|
||||
configuration file to avoid 60s timeout while search file under user
|
||||
space failure.
|
||||
|
|
|
|||
|
|
@ -2485,6 +2485,18 @@ int cnss_minidump_remove_region(struct cnss_plat_data *plat_priv,
|
|||
}
|
||||
#endif /* CONFIG_QCOM_MINIDUMP */
|
||||
|
||||
int cnss_request_firmware_direct(struct cnss_plat_data *plat_priv,
|
||||
const struct firmware **fw_entry,
|
||||
const char *filename)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_CNSS_REQ_FW_DIRECT))
|
||||
return request_firmware_direct(fw_entry, filename,
|
||||
&plat_priv->plat_dev->dev);
|
||||
else
|
||||
return request_firmware(fw_entry, filename,
|
||||
&plat_priv->plat_dev->dev);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_INTERCONNECT)
|
||||
/**
|
||||
* cnss_register_bus_scale() - Setup interconnect voting data
|
||||
|
|
|
|||
|
|
@ -562,4 +562,7 @@ int cnss_get_tcs_info(struct cnss_plat_data *plat_priv);
|
|||
unsigned int cnss_get_timeout(struct cnss_plat_data *plat_priv,
|
||||
enum cnss_timeout_type);
|
||||
int cnss_dev_specific_power_on(struct cnss_plat_data *plat_priv);
|
||||
int cnss_request_firmware_direct(struct cnss_plat_data *plat_priv,
|
||||
const struct firmware **fw_entry,
|
||||
const char *filename);
|
||||
#endif /* _CNSS_MAIN_H */
|
||||
|
|
|
|||
|
|
@ -603,7 +603,13 @@ int cnss_wlfw_bdf_dnld_send_sync(struct cnss_plat_data *plat_priv,
|
|||
goto err_req_fw;
|
||||
}
|
||||
|
||||
ret = request_firmware(&fw_entry, filename, &plat_priv->plat_dev->dev);
|
||||
if (bdf_type == CNSS_BDF_REGDB)
|
||||
ret = cnss_request_firmware_direct(plat_priv, &fw_entry,
|
||||
filename);
|
||||
else
|
||||
ret = request_firmware(&fw_entry, filename,
|
||||
&plat_priv->plat_dev->dev);
|
||||
|
||||
if (ret) {
|
||||
cnss_pr_err("Failed to load BDF: %s\n", filename);
|
||||
goto err_req_fw;
|
||||
|
|
@ -1012,8 +1018,8 @@ int cnss_wlfw_qdss_dnld_send_sync(struct cnss_plat_data *plat_priv)
|
|||
}
|
||||
|
||||
cnss_get_qdss_cfg_filename(plat_priv, qdss_cfg_filename, sizeof(qdss_cfg_filename));
|
||||
ret = request_firmware(&fw_entry, qdss_cfg_filename,
|
||||
&plat_priv->plat_dev->dev);
|
||||
ret = cnss_request_firmware_direct(plat_priv, &fw_entry,
|
||||
qdss_cfg_filename);
|
||||
if (ret) {
|
||||
cnss_pr_err("Failed to load QDSS: %s\n",
|
||||
qdss_cfg_filename);
|
||||
|
|
|
|||
Loading…
Reference in a new issue