Thread (12 messages) 12 messages, 4 authors, 2018-06-24

Re: [PATCH] brcmfmac: stop watchdog before detach and free everything

From: Arend van Spriel <arend.vanspriel@broadcom.com>
Date: 2018-05-29 09:23:07
Also in: linux-wireless, lkml

On 5/28/2018 5:33 PM, Michael Nazzareno Trimarchi wrote:
quoted hunk ↗ jump to hunk
Hi Andy

The problem seems really easy to solve:
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index 412a05b..ba60b151 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -4227,13 +4227,7 @@ struct brcmf_sdio *brcmf_sdio_probe(struct
brcmf_sdio_dev *sdiodev)
         timer_setup(&bus->timer, brcmf_sdio_watchdog, 0);
         /* Initialize watchdog thread */
         init_completion(&bus->watchdog_wait);
-       bus->watchdog_tsk = kthread_run(brcmf_sdio_watchdog_thread,
-                                       bus, "brcmf_wdog/%s",
-                                       dev_name(&sdiodev->func1->dev));
-       if (IS_ERR(bus->watchdog_tsk)) {
-               pr_warn("brcmf_watchdog thread failed to start\n");
-               bus->watchdog_tsk = NULL;
-       }
+
         /* Initialize DPC thread */
         bus->dpc_triggered = false;
         bus->dpc_running = false;
@@ -4281,6 +4275,14 @@ struct brcmf_sdio *brcmf_sdio_probe(struct
brcmf_sdio_dev *sdiodev)
                 goto fail;
         }

+       bus->watchdog_tsk = kthread_run(brcmf_sdio_watchdog_thread,
+                                       bus, "brcmf_wdog/%s",
+                                       dev_name(&sdiodev->func1->dev));
+       if (IS_ERR(bus->watchdog_tsk)) {
+               pr_warn("brcmf_watchdog thread failed to start\n");
+               bus->watchdog_tsk = NULL;
+       }
+
         return bus;
Hi Michael,

That makes no sense. Or are you saying the function 
brcmf_fw_get_firmwares() fails for you? Oh wait, you mentioned the 
driver was built-in, right? The above change does not solve the issue. 
It just makes it less likely to occur. So I think your initial fix is 
the best solution for this.

Regards,
Arend
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help