From patchwork Mon Aug 28 19:18:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maya Erez X-Patchwork-Id: 9926041 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AF1E560375 for ; Mon, 28 Aug 2017 19:18:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1B452879B for ; Mon, 28 Aug 2017 19:18:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96CC32879E; Mon, 28 Aug 2017 19:18:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 486972879B for ; Mon, 28 Aug 2017 19:18:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751291AbdH1TS4 (ORCPT ); Mon, 28 Aug 2017 15:18:56 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:41752 "EHLO alexa-out-lv-01.qualcomm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751192AbdH1TSy (ORCPT ); Mon, 28 Aug 2017 15:18:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1503947934; x=1535483934; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=ZzBcDFp5jYQEarHLfw5l9B6WMn0u8hxaa7+3DtlwJIM=; b=w2VgikHnzZP0hWuIUKOTq4SXH+qPpNHRMb1+i1DcaF5JiMi3aBSqX8+w qPSocy8n0SHFOgrQGOc9cv7pU4v+QpzW00/ZCpu/2rMYfCfK53o2zWs6c k3d7Ozr4zDqkBrUxcWj1fpJ8VxJ+lt6lGlcm39O53IQbrvi58rmskgU1w I=; X-IronPort-AV: E=Sophos;i="5.41,442,1498546800"; d="scan'208";a="4181688" Received: from ironmsg03-r-new.qualcomm.com (HELO Ironmsg03-R.qualcomm.com) ([10.53.140.107]) by alexa-out-lv-01.qualcomm.com with ESMTP; 28 Aug 2017 12:18:54 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8637"; a="1430573078" X-MGA-submission: =?us-ascii?q?MDGP+AXj0eKSJJdUTeY/Jc2nAVRYsLnifdrtZp?= =?us-ascii?q?qdDgPY/CDI4ykMQAa/WjbUr1SspX09vhBsWVuwX0XpOgLfrqNwSAY99p?= =?us-ascii?q?Yz/HVNiHPqhz+xv+MctYRnvdnIwDHVyWz288bRGwwPfdvXu9l3SZ0411?= =?us-ascii?q?Jm?= Received: from lx-merez1.mea.qualcomm.com ([10.18.173.103]) by Ironmsg03-R.qualcomm.com with ESMTP; 28 Aug 2017 12:18:52 -0700 From: Maya Erez To: Kalle Valo Cc: Lior David , linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com, Maya Erez Subject: [PATCH 1/7] wil6210: ratelimit errors in TX/RX interrupts Date: Mon, 28 Aug 2017 22:18:41 +0300 Message-Id: <1503947927-18877-2-git-send-email-qca_merez@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503947927-18877-1-git-send-email-qca_merez@qca.qualcomm.com> References: <1503947927-18877-1-git-send-email-qca_merez@qca.qualcomm.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Lior David Sometimes there is a firmware crash but the hardware is not fully stopped and continue to send TX/RX interrupts. This can cause an overload of messages which can bring the host down. Add ratelimit to these error messages to fix this. Signed-off-by: Lior David Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/interrupt.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/interrupt.c b/drivers/net/wireless/ath/wil6210/interrupt.c index cad8a95..59def4f 100644 --- a/drivers/net/wireless/ath/wil6210/interrupt.c +++ b/drivers/net/wireless/ath/wil6210/interrupt.c @@ -244,7 +244,7 @@ static irqreturn_t wil6210_irq_rx(int irq, void *cookie) wil_dbg_irq(wil, "ISR RX 0x%08x\n", isr); if (unlikely(!isr)) { - wil_err(wil, "spurious IRQ: RX\n"); + wil_err_ratelimited(wil, "spurious IRQ: RX\n"); return IRQ_NONE; } @@ -269,11 +269,12 @@ static irqreturn_t wil6210_irq_rx(int irq, void *cookie) need_unmask = false; napi_schedule(&wil->napi_rx); } else { - wil_err(wil, + wil_err_ratelimited( + wil, "Got Rx interrupt while stopping interface\n"); } } else { - wil_err(wil, "Got Rx interrupt while in reset\n"); + wil_err_ratelimited(wil, "Got Rx interrupt while in reset\n"); } } @@ -302,7 +303,7 @@ static irqreturn_t wil6210_irq_tx(int irq, void *cookie) wil_dbg_irq(wil, "ISR TX 0x%08x\n", isr); if (unlikely(!isr)) { - wil_err(wil, "spurious IRQ: TX\n"); + wil_err_ratelimited(wil, "spurious IRQ: TX\n"); return IRQ_NONE; } @@ -318,12 +319,13 @@ static irqreturn_t wil6210_irq_tx(int irq, void *cookie) need_unmask = false; napi_schedule(&wil->napi_tx); } else { - wil_err(wil, "Got Tx interrupt while in reset\n"); + wil_err_ratelimited(wil, "Got Tx interrupt while in reset\n"); } } if (unlikely(isr)) - wil_err(wil, "un-handled TX ISR bits 0x%08x\n", isr); + wil_err_ratelimited(wil, "un-handled TX ISR bits 0x%08x\n", + isr); /* Tx IRQ will be enabled when NAPI processing finished */