Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3174602imm; Tue, 29 May 2018 02:23:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKGqbXFr8Kz5gD8M9jliTxU5UU8nWxHow5J6Z9ACUQ7sH+RKRs/pwdVTLrFqsNk/VDkpJDi X-Received: by 2002:a65:4c87:: with SMTP id m7-v6mr5584661pgt.364.1527585831631; Tue, 29 May 2018 02:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527585831; cv=none; d=google.com; s=arc-20160816; b=IPBgbeSMsmq8y+u9SLhSovefFAjNkL5uIRMkqzhX2+k7Lg3XD+rhLl/6aMsTDIS8+4 XYkOxZA/pK7kj6XXE1C9yh2PHBDQT5Z0a3RGWE3/DH/jkh1or0JUeqpiIFfOd2zauwxZ 2ikMyVQgaEfxDr7YT+fRt/g7vHqhM9AVuNNVQWqjfny02ill0wYdCCAk5j4GcuitWzht bbRBv2veZDl02MAGo8hGgHpdWqn6GmveQNHDli85MSPUXDUgcnyjcedDpSG7JeCwFfIK 0dOhFE3CvJ+VOeRRkXIjoRqvYPcUlrOADetCRSOju52oDZXGpBOu4qqUsF81ORQ60hn7 TZbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=RiYP5KrJppMfZcFB/+TAs5lyw+4mEUTC3Q53eg0eBoM=; b=f9HJmxewhxg4BF5jnCVk0Z/oBGjAKKZtrKE7rPbeGyngGTtUDpkBn6Lhfk1HHpYxL+ morSoxisegdSrn7H4ArAmqSldVg03QbMD9VruOPE/Hw3frVyB1Khr6q33khE7Ggp9A8H Ut2I3VacCXTcGTnL7BP3xk74pFvqcEwIDtWhghY6lXXI7zO3zrCSkHXmTad/cH6j14lS ugN9XDl8AtOBXbnqhCjCjAaOv8/d8U8EmmkG+ssUNyh6w98OWS9K0d9s+36vRI3ZeqLS JueUToJS7xZgV5J7DIwh8IzfYssIYsQmo91WeUnrLaF5n/xZGH4k3WFnJ1to7fMYooEE A9eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=HNP5sCWW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 30-v6si3868324plf.596.2018.05.29.02.23.37; Tue, 29 May 2018 02:23:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=HNP5sCWW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932656AbeE2JXH (ORCPT + 99 others); Tue, 29 May 2018 05:23:07 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:45218 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932517AbeE2JXC (ORCPT ); Tue, 29 May 2018 05:23:02 -0400 Received: by mail-qt0-f194.google.com with SMTP id i18-v6so7087301qtp.12 for ; Tue, 29 May 2018 02:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=RiYP5KrJppMfZcFB/+TAs5lyw+4mEUTC3Q53eg0eBoM=; b=HNP5sCWWlF1BpDWZTQoysS+uf6txco+ayrYayO1G0woAXqDO2xe5Q8+BOBm1xHvaKe opWPzXVtylsJyfJIx0gAXdujCHWIQBg4tLc8dOW2aeb1E660xXKTPZmWNdz3R6kwA1As fcybTJfI8Npf4ZAnSdM8n4nV/QaXf7vd8Wtu0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=RiYP5KrJppMfZcFB/+TAs5lyw+4mEUTC3Q53eg0eBoM=; b=bVhgZK+GWCN7y0XghfqOD0pPUJYUM0FpQgypABhV1ue8qVN90lPHwZCpjZq19/YfdO OTTvJDS7UdzZmQsrputTYbaIxIeJXI8Rs4gqosRv5TQ3tg9VIWpN3PBKgEGgjr8tQMVh gArQH40MjOn82NlUix8wjEKk/snfzYV/0dCZgb48rgVM2dMt/6QPiP60PUCMLi2AyrEm i8AFanT1Gtp7ragQryobDtvAvcptFa1YtHuPIbaZXTpyI3yPj4b+J+ZU1VsyHDIFZuev xPWdgL1oVi7IQt6s2c8zyW92dPa+yeqEu/RBrh0P1LpKXHZ56DZ/9xJAa3FPivv0SgaH yC3g== X-Gm-Message-State: ALKqPwfA646pnDsdar1lOnAP1UAt03IO8IkfuBz3k7QcBZMfBmqPRnC7 cf885VQeJl95FB7/u8KmRQQ1R8R/ X-Received: by 2002:ac8:a44:: with SMTP id f4-v6mr15415862qti.45.1527585781976; Tue, 29 May 2018 02:23:01 -0700 (PDT) Received: from [10.176.68.125] ([192.19.248.250]) by smtp.gmail.com with ESMTPSA id x4-v6sm5019177qti.7.2018.05.29.02.22.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 02:23:01 -0700 (PDT) Subject: Re: [PATCH] brcmfmac: stop watchdog before detach and free everything To: Michael Nazzareno Trimarchi , Andy Shevchenko References: <1527493857-2220-1-git-send-email-michael@amarulasolutions.com> <5B0BD13D.8000809@broadcom.com> Cc: Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Kalle Valo , "David S. Miller" , Pieter-Paul Giesberts , Ian Molton , "open list:TI WILINK WIRELES..." , "open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER" , brcm80211-dev-list@cypress.com, netdev , LKML From: Arend van Spriel Message-ID: <5B0D1BF1.7070105@broadcom.com> Date: Tue, 29 May 2018 11:22:57 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/28/2018 5:33 PM, Michael Nazzareno Trimarchi wrote: > 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