Patch "net: fec: Fix FEC_ECR_EN1588 being cleared on link-down" has been added to the 5.10-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: fec: Fix FEC_ECR_EN1588 being cleared on link-down

to the 5.10-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-fec-fix-fec_ecr_en1588-being-cleared-on-link-dow.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 114bbfad957c4eaa6041ef4e7297af49d9d235c7
Author: Csókás, Bence <csokas.bence@xxxxxxxxx>
Date:   Wed Jun 19 14:31:11 2024 +0200

    net: fec: Fix FEC_ECR_EN1588 being cleared on link-down
    
    [ Upstream commit c32fe1986f27cac329767d3497986e306cad1d5e ]
    
    FEC_ECR_EN1588 bit gets cleared after MAC reset in `fec_stop()`, which
    makes all 1588 functionality shut down, and all the extended registers
    disappear, on link-down, making the adapter fall back to compatibility
    "dumb mode". However, some functionality needs to be retained (e.g. PPS)
    even without link.
    
    Fixes: 6605b730c061 ("FEC: Add time stamping code and a PTP hardware clock")
    Cc: Richard Cochran <richardcochran@xxxxxxxxx>
    Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
    Link: https://lore.kernel.org/netdev/5fa9fadc-a89d-467a-aae9-c65469ff5fe1@xxxxxxx/
    Signed-off-by: Csókás, Bence <csokas.bence@xxxxxxxxx>
    Reviewed-by: Wei Fang <wei.fang@xxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 269c6365ec09b..a591ca0b37787 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1201,6 +1201,12 @@ fec_stop(struct net_device *ndev)
 		writel(FEC_ECR_ETHEREN, fep->hwp + FEC_ECNTRL);
 		writel(rmii_mode, fep->hwp + FEC_R_CNTRL);
 	}
+
+	if (fep->bufdesc_ex) {
+		val = readl(fep->hwp + FEC_ECNTRL);
+		val |= FEC_ECR_EN1588;
+		writel(val, fep->hwp + FEC_ECNTRL);
+	}
 }
 
 static void




[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