]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: xilinx-nwl: Rate-limit misc interrupt messages
authorSean Anderson <sean.anderson@linux.dev>
Fri, 31 May 2024 16:13:34 +0000 (12:13 -0400)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 22 Aug 2024 18:38:03 +0000 (13:38 -0500)
The conditions logged by the misc interrupt can occur repeatedly and
continuously. Avoid rendering the console unusable by rate-limiting
these messages.

Link: https://lore.kernel.org/r/20240531161337.864994-5-sean.anderson@linux.dev
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/controller/pcie-xilinx-nwl.c

index ce881baac6d83c9f50999c9c39f8f379dca4078a..c0a60cebdb2e1fd043830ad10cca4ca4283b2d02 100644 (file)
@@ -267,37 +267,37 @@ static irqreturn_t nwl_pcie_misc_handler(int irq, void *data)
                return IRQ_NONE;
 
        if (misc_stat & MSGF_MISC_SR_RXMSG_OVER)
-               dev_err(dev, "Received Message FIFO Overflow\n");
+               dev_err_ratelimited(dev, "Received Message FIFO Overflow\n");
 
        if (misc_stat & MSGF_MISC_SR_SLAVE_ERR)
-               dev_err(dev, "Slave error\n");
+               dev_err_ratelimited(dev, "Slave error\n");
 
        if (misc_stat & MSGF_MISC_SR_MASTER_ERR)
-               dev_err(dev, "Master error\n");
+               dev_err_ratelimited(dev, "Master error\n");
 
        if (misc_stat & MSGF_MISC_SR_I_ADDR_ERR)
-               dev_err(dev, "In Misc Ingress address translation error\n");
+               dev_err_ratelimited(dev, "In Misc Ingress address translation error\n");
 
        if (misc_stat & MSGF_MISC_SR_E_ADDR_ERR)
-               dev_err(dev, "In Misc Egress address translation error\n");
+               dev_err_ratelimited(dev, "In Misc Egress address translation error\n");
 
        if (misc_stat & MSGF_MISC_SR_FATAL_AER)
-               dev_err(dev, "Fatal Error in AER Capability\n");
+               dev_err_ratelimited(dev, "Fatal Error in AER Capability\n");
 
        if (misc_stat & MSGF_MISC_SR_NON_FATAL_AER)
-               dev_err(dev, "Non-Fatal Error in AER Capability\n");
+               dev_err_ratelimited(dev, "Non-Fatal Error in AER Capability\n");
 
        if (misc_stat & MSGF_MISC_SR_CORR_AER)
-               dev_err(dev, "Correctable Error in AER Capability\n");
+               dev_err_ratelimited(dev, "Correctable Error in AER Capability\n");
 
        if (misc_stat & MSGF_MISC_SR_UR_DETECT)
-               dev_err(dev, "Unsupported request Detected\n");
+               dev_err_ratelimited(dev, "Unsupported request Detected\n");
 
        if (misc_stat & MSGF_MISC_SR_NON_FATAL_DEV)
-               dev_err(dev, "Non-Fatal Error Detected\n");
+               dev_err_ratelimited(dev, "Non-Fatal Error Detected\n");
 
        if (misc_stat & MSGF_MISC_SR_FATAL_DEV)
-               dev_err(dev, "Fatal Error Detected\n");
+               dev_err_ratelimited(dev, "Fatal Error Detected\n");
 
        if (misc_stat & MSGF_MISC_SR_LINK_AUTO_BWIDTH)
                dev_info(dev, "Link Autonomous Bandwidth Management Status bit set\n");