Patch "net: axienet: Move reset before 64-bit DMA detection" has been added to the 5.15-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: axienet: Move reset before 64-bit DMA detection

to the 5.15-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-axienet-move-reset-before-64-bit-dma-detection.patch
and it can be found in the queue-5.15 subdirectory.

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



commit dc2c39f68ae9f517cb5f13f5941196b1e988a42e
Author: Maxim Kochetkov <fido_max@xxxxxxxx>
Date:   Thu Jun 22 22:22:45 2023 +0300

    net: axienet: Move reset before 64-bit DMA detection
    
    [ Upstream commit f1bc9fc4a06de0108e0dca2a9a7e99ba1fc632f9 ]
    
    64-bit DMA detection will fail if axienet was started before (by boot
    loader, boot ROM, etc). In this state axienet will not start properly.
    XAXIDMA_TX_CDESC_OFFSET + 4 register (MM2S_CURDESC_MSB) is used to detect
    64-bit DMA capability here. But datasheet says: When DMACR.RS is 1
    (axienet is in enabled state), CURDESC_PTR becomes Read Only (RO) and
    is used to fetch the first descriptor. So iowrite32()/ioread32() trick
    to this register to detect 64-bit DMA will not work.
    So move axienet reset before 64-bit DMA detection.
    
    Fixes: f735c40ed93c ("net: axienet: Autodetect 64-bit DMA capability")
    Signed-off-by: Maxim Kochetkov <fido_max@xxxxxxxx>
    Reviewed-by: Robert Hancock <robert.hancock@xxxxxxxxxx>
    Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxx>
    Link: https://lore.kernel.org/r/20230622192245.116864-1-fido_max@xxxxxxxx
    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 fbbbcfe0e891e..e7f6c29b8dd82 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -2075,6 +2075,11 @@ static int axienet_probe(struct platform_device *pdev)
 		goto cleanup_clk;
 	}
 
+	/* Reset core now that clocks are enabled, prior to accessing MDIO */
+	ret = __axienet_device_reset(lp);
+	if (ret)
+		goto cleanup_clk;
+
 	/* Autodetect the need for 64-bit DMA pointers.
 	 * When the IP is configured for a bus width bigger than 32 bits,
 	 * writing the MSB registers is mandatory, even if they are all 0.
@@ -2122,11 +2127,6 @@ static int axienet_probe(struct platform_device *pdev)
 	lp->coalesce_count_rx = XAXIDMA_DFT_RX_THRESHOLD;
 	lp->coalesce_count_tx = XAXIDMA_DFT_TX_THRESHOLD;
 
-	/* Reset core now that clocks are enabled, prior to accessing MDIO */
-	ret = __axienet_device_reset(lp);
-	if (ret)
-		goto cleanup_clk;
-
 	ret = axienet_mdio_setup(lp);
 	if (ret)
 		dev_warn(&pdev->dev,



[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