nvethernet: Support both DT flags to maintain backward compatibility

In the previous release for T264 platforms,the restart lane bringup
logic was controlled through the device tree flag
'nvidia,pcs-rx-eq-sw-ovrd'.
In incremental releases, the flag has been renamed
'nvidia,force-restart-lane-bringup'.

To maintain backward compatibility with older device trees,
the driver now checks for both flags.If either flag is present,
restart lane bringup is executed.

The legacy flag 'nvidia,pcs-rx-eq-sw-ovrd' is deprecated.

Bug 5017313

Change-Id: I24040f508ef776e29a0bb0c1f07d4a74fa4cc8cc
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3471233
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Revanth Kumar Uppala
2025-10-16 11:00:33 +00:00
committed by mobile promotions
parent a530fa20f8
commit 9831027796
3 changed files with 18 additions and 9 deletions

View File

@@ -7193,12 +7193,19 @@ static int ether_parse_dt(struct ether_priv_data *pdata)
osi_core->mdc_cr = def_mdc_cr[osi_core->mac]; osi_core->mdc_cr = def_mdc_cr[osi_core->mac];
} }
ret_val = of_property_read_u32(np, "nvidia,pcs-rx-eq-sw-ovrd", &osi_core->pcs_rx_eq_sw_ovrd_en); ret_val = of_property_read_u32(np, "nvidia,pcs-rx-eq-sw-ovrd",
if (ret_val < 0 || osi_core->pcs_rx_eq_sw_ovrd_en != OSI_RX_EQ_SW_OVRD) { &pdata->force_restart_lane_bringup);
dev_info(dev, "failed to read or invalid RX EQ SW override - default to 0\n"); if ((ret_val == 0) && (pdata->force_restart_lane_bringup == OSI_ENABLE)) {
osi_core->pcs_rx_eq_sw_ovrd_en = 0; pdata->force_restart_lane_bringup = 1;
} else { } else {
osi_core->pcs_rx_eq_sw_ovrd_en = 1; ret_val = of_property_read_u32(np, "nvidia,force-restart-lane-bringup",
&pdata->force_restart_lane_bringup);
if ((ret_val == 0) && (pdata->force_restart_lane_bringup == OSI_ENABLE)) {
pdata->force_restart_lane_bringup = 1;
} else {
dev_info(dev, "failed to read or invalid force-restart-lane-bringup - default to 0\n");
pdata->force_restart_lane_bringup = 0;
}
} }
exit: exit:

View File

@@ -759,6 +759,8 @@ struct ether_priv_data {
u32 coe_enable; u32 coe_enable;
/** OSI instance of COE */ /** OSI instance of COE */
struct osi_mgbe_coe mgbe_coe; struct osi_mgbe_coe mgbe_coe;
/** Flag to retry restart_lane_bringup logic */
u32 force_restart_lane_bringup;
}; };
/** /**

View File

@@ -875,15 +875,15 @@ static void osd_core_printf(struct osi_core_priv_data *osi_core,
void ether_restart_lane_bringup_task(struct tasklet_struct *t) void ether_restart_lane_bringup_task(struct tasklet_struct *t)
{ {
struct ether_priv_data *pdata = from_tasklet(pdata, t, lane_restart_task); struct ether_priv_data *pdata = from_tasklet(pdata, t, lane_restart_task);
struct osi_core_priv_data *osi_core = pdata->osi_core;
if (pdata->osi_core->mac == OSI_MAC_HW_MGBE_T26X) { if (pdata->osi_core->mac == OSI_MAC_HW_MGBE_T26X) {
/** /**
* Don't skip restart_lane_bringup_task for Jedha platform * Force restart_lane_bringup_task for the platforms
* as this has fixed link and lane bringup has to be executed every time * that has force-restart-lane-bringup flag in their DT.
* And lane bringup will gets executed every time
* on link change at link partner side. * on link change at link partner side.
*/ */
if (!osi_core->pcs_rx_eq_sw_ovrd_en) { if (pdata->force_restart_lane_bringup == OSI_DISABLE) {
netdev_info(pdata->ndev, "Ignoring restart_lane_bringup_task!!!\n"); netdev_info(pdata->ndev, "Ignoring restart_lane_bringup_task!!!\n");
return; return;
} }