Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2657069pxa; Mon, 17 Aug 2020 15:42:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBkIUjiC5y4vmT0V1vJdYabYj4PUYd60err6Lj/1KHH/YmxtRLLCwSL/YPW7m5u87Fy29F X-Received: by 2002:a50:de04:: with SMTP id z4mr17412465edk.10.1597704171377; Mon, 17 Aug 2020 15:42:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704171; cv=none; d=google.com; s=arc-20160816; b=Q6yLtzRDnzvlR9tFB7DbxZoUOTI19xsiBrDOb+0P2ODelloOq7viduny4jgHvnWaf6 AUHfwNz7sFCjRcPUtffYM7C9mHJiGU6TqAgYtZCh4g6asuZVLn3KPosJktN0I1Cjlsf3 7IDdq1VbKakVd3qFpzL077emchKJHrBlrmY+pB3IH9z+Ks1OoLsK2/3DS4d61fYQlBBP c3iqBwwwNiwMVwHrCcMmBpsjMIpn0lMDo6hohZL5F54tKsOFtPNaMXCOXO0putJE46tp 5QZkPXQwIaDCNCuyTM/Key4r2Qvjvpu4dggkJS8nLpvgqodeblRlFWypmkB/sxtObavG VkeA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X80vADWk+zufanIRdp2xNFR8w29qW9WQO3iBW3V/ncY=; b=ZySMTh9sivWNGLCNMHUVMCFFvz4l3tw0O7xR8rw/lyvMqYz5GIoeng/3SGK+k2SRD0 cYLfs7AkPGQ37skTO93hqH0irp4L9KdWVWfkfMkHYt/ujL2NVk6NRmwyb3oam4NvrHpj 0+5+ucVZxrclEcxn5+s1ZadbHdprjSoWBZ8kBOxg9DftFvo1ht9TigCTSOph3PurY4eP yE4+T6F2BPNTWvHw40/xod0bAUdrLGZTxx8OGBiSwJIIh6Fw9sa1g6DghdwuwVW2NcXa DyOvfHng0+0h0mphzb+1MJWMiiLXKglMBf6IzBdDo4YNWKK7FbRAvB2t3i4k8jtVPfhy sEWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pnErmxzh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y3si14521433ede.295.2020.08.17.15.42.28; Mon, 17 Aug 2020 15:42:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pnErmxzh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390878AbgHQSZr (ORCPT + 99 others); Mon, 17 Aug 2020 14:25:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:50112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387633AbgHQQCi (ORCPT ); Mon, 17 Aug 2020 12:02:38 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7686420748; Mon, 17 Aug 2020 16:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597680158; bh=lKuZlK3cGDBnz/UmpJbdWU1Dq2Z9F6gf9uSTeiD+aeU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pnErmxzhPMp2CRl4IWjQP2CUqOx2JviUxTZ/tvcytRSlsoZ9NTUdwFTqYC3bNaBzq a3fcqKQNidAxlVg3nFF1HT3s6jDBGCky6aGobpoQB1LQlgVEtWWzXXB0djn+OEoP/o VQcaY9Cxw2GffEjv+5pR0i93Q6pwKXUQpQn7Tr1I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wright Feng , Chi-hsien Lin , Kalle Valo , Sasha Levin Subject: [PATCH 5.4 075/270] brcmfmac: keep SDIO watchdog running when console_interval is non-zero Date: Mon, 17 Aug 2020 17:14:36 +0200 Message-Id: <20200817143759.491435223@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143755.807583758@linuxfoundation.org> References: <20200817143755.807583758@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wright Feng [ Upstream commit eccbf46b15bb3e35d004148f7c3a8fa8e9b26c1e ] brcmfmac host driver makes SDIO bus sleep and stops SDIO watchdog if no pending event or data. As a result, host driver does not poll firmware console buffer before buffer overflow, which leads to missing firmware logs. We should not stop SDIO watchdog if console_interval is non-zero in debug build. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200604071835.3842-4-wright.feng@cypress.com Signed-off-by: Sasha Levin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index d43247a95ce53..38e6809f16c75 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -3685,7 +3685,11 @@ static void brcmf_sdio_bus_watchdog(struct brcmf_sdio *bus) if (bus->idlecount > bus->idletime) { brcmf_dbg(SDIO, "idle\n"); sdio_claim_host(bus->sdiodev->func1); - brcmf_sdio_wd_timer(bus, false); +#ifdef DEBUG + if (!BRCMF_FWCON_ON() || + bus->console_interval == 0) +#endif + brcmf_sdio_wd_timer(bus, false); bus->idlecount = 0; brcmf_sdio_bus_sleep(bus, true, false); sdio_release_host(bus->sdiodev->func1); -- 2.25.1