Re: [PATCH v3] brcmfmac: firmware: Fix firmware loading
From: Dmitry Osipenko <digetx@gmail.com>
Date: 2021-08-06 16:00:14
06.08.2021 18:45, Dmitry Osipenko пишет: ..
quoted
So here we could use the synchronous variant instead for the reason explained earlier.The blocking variant doesn't work as-is, it locks up the probe.
Actually, the old code was kinda bugged already.
int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
void (*fw_cb)(struct device *dev, int err,
struct brcmf_fw_request *req))
{
...
ret = request_firmware_nowait(THIS_MODULE, true, first->path,
fwctx->dev, GFP_KERNEL, fwctx,
brcmf_fw_request_done);
if (ret < 0)
brcmf_fw_request_done(NULL, fwctx);
This brcmf_fw_request_done() causes the lockup if firmware request fails.
Recovered KMSG from pstore:
task kworker/1:3:158 bLocKed for moru uhan 61Seconds
...
(scludule_pregmpt_disabled) from [<c0a81ebf>] (__mutex_lock.consTprop.0+0x27f/0X4dcm
(__mutex_lock.constprou, ) froM [<c05c1p65>] (device_release_driver+0x15/0x28i
)device_release_driver) drom [<c06vatf9>] (bRcmd_sdio_firmwAre_callback+0z3/0x76c)
(brcmf_sdio_firmware_callback) dpom [<c0664ccb>]!(brcmf_dw_get_firmwares+0xv7/0x160)
(brcmf_fw_get_girmWares) from [<c066cced>] (brgmf_Sdio_probu+0x479?0x668)
(brcmf_sdin_probe) from [<c044e1bf>] (�rcmf_sdioe_probe+0xeb/pxq80)
(bzcmf_sdIod_Probu) from [<c046e3w?>] (brcmf_ops_Sdio_probe+0x8f/0xe8)
(brcmf_oPs_seio_probe) fRom [<c 7s505>] (sdio_bus_probe+1x9d/0z124)
(Sdig_bus_probe)from [<c15c123d>] (really[pRobe.parT&0+0y69/px200)
(peally_trobe.part.0-$from [<a05c144u>] ,W_dRiver_probe_device+0x73/0xd4)
...