]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
qualcommax: qca-edma: rate-limit malformed RX warnings
authorRobert Marko <robimarko@gmail.com>
Sun, 12 Jul 2026 19:44:25 +0000 (21:44 +0200)
committerRobert Marko <robimarko@gmail.com>
Mon, 13 Jul 2026 10:34:33 +0000 (12:34 +0200)
A malformed RX preheader can occur repeatedly after the descriptor ring
overruns. Rate-limit the warning to prevent excessive console output
from making the receive stall worse.

Decode the little-endian preheader metadata before printing it and use
consistent hexadecimal formatting.

Link: https://github.com/openwrt/openwrt/pull/24203
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/qualcommax/files/drivers/net/ethernet/qualcomm/qca_edma.c

index 2845c88b315fb347ddcae461fbde90d98486d1ce..37110d2f96b2bcec66e8ea6692f45aefa88d36e9 100644 (file)
@@ -359,11 +359,11 @@ static u32 edma_clean_rx(struct edma_priv *priv, int budget,
 
                if (EDMA_RXPH_SRC_INFO_TYPE_GET(rxph) !=
                    EDMA_PREHDR_DSTINFO_PORTID_IND) {
-                       dev_warn(
-                               &pdev->dev,
-                               "rx drop: src_info_type=0x%x src_info=0x%04x dst_info=0x%04x\n",
-                               EDMA_RXPH_SRC_INFO_TYPE_GET(rxph),
-                               rxph->src_info, rxph->dst_info);
+                       dev_warn_ratelimited(&pdev->dev,
+                                            "rx drop: src_info_type=%#x src_info=%#06x dst_info=%#06x\n",
+                                            EDMA_RXPH_SRC_INFO_TYPE_GET(rxph),
+                                            le16_to_cpu(rxph->src_info),
+                                            le16_to_cpu(rxph->dst_info));
                        page_pool_put_full_page(priv->page_pool, page, true);
                        goto next;
                }