Patch "net: xilinx: axienet: Fix IRQ coalescing packet count overflow" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: xilinx: axienet: Fix IRQ coalescing packet count overflow

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-xilinx-axienet-fix-irq-coalescing-packet-count-o.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 342433c5833d7c376bc8a8c6a46405719814dc87
Author: Sean Anderson <sean.anderson@xxxxxxxxx>
Date:   Mon Jan 13 11:30:00 2025 -0500

    net: xilinx: axienet: Fix IRQ coalescing packet count overflow
    
    [ Upstream commit c17ff476f53afb30f90bb3c2af77de069c81a622 ]
    
    If coalesce_count is greater than 255 it will not fit in the register and
    will overflow. This can be reproduced by running
    
        # ethtool -C ethX rx-frames 256
    
    which will result in a timeout of 0us instead. Fix this by checking for
    invalid values and reporting an error.
    
    Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
    Signed-off-by: Sean Anderson <sean.anderson@xxxxxxxxx>
    Reviewed-by: Shannon Nelson <shannon.nelson@xxxxxxx>
    Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxx>
    Link: https://patch.msgid.link/20250113163001.2335235-1-sean.anderson@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 1fcbcaa85ebdb..de10a2d08c428 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -2056,6 +2056,12 @@ axienet_ethtools_set_coalesce(struct net_device *ndev,
 		return -EBUSY;
 	}
 
+	if (ecoalesce->rx_max_coalesced_frames > 255 ||
+	    ecoalesce->tx_max_coalesced_frames > 255) {
+		NL_SET_ERR_MSG(extack, "frames must be less than 256");
+		return -EINVAL;
+	}
+
 	if (ecoalesce->rx_max_coalesced_frames)
 		lp->coalesce_count_rx = ecoalesce->rx_max_coalesced_frames;
 	if (ecoalesce->rx_coalesce_usecs)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux