]> git.baikalelectronics.ru Git - kernel.git/commitdiff
r8152: Rate limit overflow messages
authorAndrew Gaul <gaul@gaul.org>
Sun, 2 Oct 2022 03:41:28 +0000 (12:41 +0900)
committerJakub Kicinski <kuba@kernel.org>
Mon, 3 Oct 2022 23:48:31 +0000 (16:48 -0700)
My system shows almost 10 million of these messages over a 24-hour
period which pollutes my logs.

Signed-off-by: Andrew Gaul <gaul@google.com>
Link: https://lore.kernel.org/r/20221002034128.2026653-1-gaul@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/r8152.c

index 688905ea0a6d3bb9436a3c6a3b4823ef592e6766..e7b0b59e2bc8c26a82fc1b992026912891fa43c7 100644 (file)
@@ -1874,7 +1874,9 @@ static void intr_callback(struct urb *urb)
                           "Stop submitting intr, status %d\n", status);
                return;
        case -EOVERFLOW:
-               netif_info(tp, intr, tp->netdev, "intr status -EOVERFLOW\n");
+               if (net_ratelimit())
+                       netif_info(tp, intr, tp->netdev,
+                                  "intr status -EOVERFLOW\n");
                goto resubmit;
        /* -EPIPE:  should clear the halt */
        default: