mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-10 03:20:49 +00:00
brcmfmac: on sdio remove first detach bus then stop worker.
Currently the function sdio_remove will first destroy the datawork workqueue and then detach the bus. This can create the situation where work gets added on non-existing work queue resulting in panic. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
f9951c1334
commit
e0c180ecf1
@ -4205,14 +4205,14 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus)
|
||||
/* De-register interrupt handler */
|
||||
brcmf_sdiod_intr_unregister(bus->sdiodev);
|
||||
|
||||
cancel_work_sync(&bus->datawork);
|
||||
if (bus->brcmf_wq)
|
||||
destroy_workqueue(bus->brcmf_wq);
|
||||
|
||||
if (bus->sdiodev->bus_if->drvr) {
|
||||
brcmf_detach(bus->sdiodev->dev);
|
||||
}
|
||||
|
||||
cancel_work_sync(&bus->datawork);
|
||||
if (bus->brcmf_wq)
|
||||
destroy_workqueue(bus->brcmf_wq);
|
||||
|
||||
if (bus->ci) {
|
||||
if (bus->sdiodev->bus_if->state == BRCMF_BUS_DOWN) {
|
||||
sdio_claim_host(bus->sdiodev->func[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user