Patch "net: ti: icssg-prueth: Fix clearing of IEP_CMP_CFG registers during iep_init" 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: ti: icssg-prueth: Fix clearing of IEP_CMP_CFG registers during iep_init

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-ti-icssg-prueth-fix-clearing-of-iep_cmp_cfg-regi.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 bb830e356c30baa20ec9d3002cdc0997cf160f3c
Author: Meghana Malladi <m-malladi@xxxxxx>
Date:   Mon Dec 23 20:45:50 2024 +0530

    net: ti: icssg-prueth: Fix clearing of IEP_CMP_CFG registers during iep_init
    
    [ Upstream commit 9b115361248dc6cce182a2dc030c1c70b0a9639e ]
    
    When ICSSG interfaces are brought down and brought up again, the
    pru cores are shut down and booted again, flushing out all the memories
    and start again in a clean state. Hence it is expected that the
    IEP_CMP_CFG register needs to be flushed during iep_init() to ensure
    that the existing residual configuration doesn't cause any unusual
    behavior. If the register is not cleared, existing IEP_CMP_CFG set for
    CMP1 will result in SYNC0_OUT signal based on the SYNC_OUT register values.
    
    After bringing the interface up, calling PPS enable doesn't work as
    the driver believes PPS is already enabled, (iep->pps_enabled is not
    cleared during interface bring down) and driver will just return true
    even though there is no signal. Fix this by disabling pps and perout.
    
    Fixes: c1e0230eeaab ("net: ti: icss-iep: Add IEP driver")
    Signed-off-by: Meghana Malladi <m-malladi@xxxxxx>
    Reviewed-by: Roger Quadros <rogerq@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.c b/drivers/net/ethernet/ti/icssg/icss_iep.c
index 5d6d1cf78e93..768578c0d958 100644
--- a/drivers/net/ethernet/ti/icssg/icss_iep.c
+++ b/drivers/net/ethernet/ti/icssg/icss_iep.c
@@ -215,6 +215,9 @@ static void icss_iep_enable_shadow_mode(struct icss_iep *iep)
 	for (cmp = IEP_MIN_CMP; cmp < IEP_MAX_CMP; cmp++) {
 		regmap_update_bits(iep->map, ICSS_IEP_CMP_STAT_REG,
 				   IEP_CMP_STATUS(cmp), IEP_CMP_STATUS(cmp));
+
+		regmap_update_bits(iep->map, ICSS_IEP_CMP_CFG_REG,
+				   IEP_CMP_CFG_CMP_EN(cmp), 0);
 	}
 
 	/* enable reset counter on CMP0 event */
@@ -780,6 +783,11 @@ int icss_iep_exit(struct icss_iep *iep)
 	}
 	icss_iep_disable(iep);
 
+	if (iep->pps_enabled)
+		icss_iep_pps_enable(iep, false);
+	else if (iep->perout_enabled)
+		icss_iep_perout_enable(iep, NULL, false);
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(icss_iep_exit);




[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