From patchwork Wed Apr 28 11:15:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shravan Kumar Ramani X-Patchwork-Id: 1471092 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FVbf50lPhz9sXH; Wed, 28 Apr 2021 21:15:39 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lbiAK-00027i-Fv; Wed, 28 Apr 2021 11:15:36 +0000 Received: from mail-il-dmz.mellanox.com ([193.47.165.129] helo=mellanox.co.il) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lbiAI-00027V-Ra for kernel-team@lists.ubuntu.com; Wed, 28 Apr 2021 11:15:34 +0000 Received: from Internal Mail-Server by MTLPINE1 (envelope-from shravankr@mellanox.com) with SMTP; 28 Apr 2021 14:15:30 +0300 Received: from farm-0002.mtbu.labs.mlnx (farm-0002.mtbu.labs.mlnx [10.15.2.32]) by mtbu-labmailer.labs.mlnx (8.14.4/8.14.4) with ESMTP id 13SBFTE7022304; Wed, 28 Apr 2021 07:15:29 -0400 Received: (from shravankr@localhost) by farm-0002.mtbu.labs.mlnx (8.14.7/8.13.8/Submit) id 13SBFTnQ024536; Wed, 28 Apr 2021 07:15:29 -0400 From: Shravan Kumar Ramani To: kernel-team@lists.ubuntu.com Subject: [SRU][F:bluefield][PATCH v1 1/1] UBUNTU: SAUCE: mlx-trio: Use rate-limited prints in interrupt handler Date: Wed, 28 Apr 2021 07:15:19 -0400 Message-Id: X-Mailer: git-send-email 2.1.2 In-Reply-To: References: In-Reply-To: References: X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Shravan Kumar Ramani MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1926424 In certain cases such as PCIe link disabled, mlx-trio prints a lot of messages which blocks UART console or ssh session. This commit calls dev_err_ratelimited() instead to limit the message amount. So they could still be printed without affecting other services. Signed-off-by: Shravan Kumar Ramani Acked-by: Krzysztof Kozlowski --- drivers/platform/mellanox/mlx-trio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/mellanox/mlx-trio.c b/drivers/platform/mellanox/mlx-trio.c index b389f2c..1fd1b7a 100644 --- a/drivers/platform/mellanox/mlx-trio.c +++ b/drivers/platform/mellanox/mlx-trio.c @@ -302,7 +302,7 @@ static irqreturn_t trio_irq_handler(int irq, void *arg) struct event_context *ctx = (struct event_context *)arg; struct trio_context *trio = ctx->trio; - dev_err(&trio->pdev->dev, + dev_err_ratelimited(&trio->pdev->dev, "mlx_trio: TRIO %d received IRQ %d event %d (%s)\n", trio->trio_index, irq, ctx->event_num, trio_events[ctx->event_num].name); @@ -312,7 +312,7 @@ static irqreturn_t trio_irq_handler(int irq, void *arg) trio_readq(trio, trio->mmio_base + trio_events[ctx->event_num].additional_info, &info); - dev_err(&trio->pdev->dev, + dev_err_ratelimited(&trio->pdev->dev, "mlx_trio: Addition IRQ info: %llx\n", info); }