diff mbox series

[SRU,F:bluefield,v1,1/1] UBUNTU: SAUCE: mlx-trio: Use rate-limited prints in interrupt handler

Message ID ea81a90d9850858435d6462c4fd414a04345f364.1619607446.git.shravankr@nvidia.com
State New
Headers show
Series [SRU,F:bluefield,v1,1/1] UBUNTU: SAUCE: mlx-trio: Use rate-limited prints in interrupt handler | expand

Commit Message

Shravan Kumar Ramani April 28, 2021, 11:15 a.m. UTC
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 <shravankr@nvidia.com>
---
 drivers/platform/mellanox/mlx-trio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski April 28, 2021, 1 p.m. UTC | #1
On 28/04/2021 13:15, Shravan Kumar Ramani wrote:
> 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 <shravankr@nvidia.com>
> ---
>  drivers/platform/mellanox/mlx-trio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

Best regards,
Krzysztof
diff mbox series

Patch

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);
 	}