mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
nvethernet:set phy oldlink status correctly
Issue: on resume the mac set speed is not called due to which the data transmissions are not happening in alternate suspend resume cycles. This is because the oldlink status is not set to 1 during the successful resume, in set_speed_work_func retries Fix: set oldlink to 1 once setspeed is successful in function set_speed_work_func, so that next time ether_adjust_link will call the set speed after resume Bug 4891730 Change-Id: Iadb426f2cada99387ce180dfa2d0c9ee57e7ccd5 Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260342 Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
This commit is contained in:
committed by
Jon Hunter
parent
6584be8cc3
commit
7d73a73146
@@ -1246,6 +1246,7 @@ static inline void set_speed_work_func(struct work_struct *work)
|
|||||||
struct phy_device *phydev = pdata->phydev;
|
struct phy_device *phydev = pdata->phydev;
|
||||||
nveu32_t iface_mode = pdata->osi_core->phy_iface_mode;
|
nveu32_t iface_mode = pdata->osi_core->phy_iface_mode;
|
||||||
struct clk *mac_clk = NULL;
|
struct clk *mac_clk = NULL;
|
||||||
|
unsigned long val = 0;
|
||||||
#ifndef OSI_STRIPPED_LIB
|
#ifndef OSI_STRIPPED_LIB
|
||||||
unsigned int eee_enable = OSI_DISABLE;
|
unsigned int eee_enable = OSI_DISABLE;
|
||||||
#endif /* !OSI_STRIPPED_LIB */
|
#endif /* !OSI_STRIPPED_LIB */
|
||||||
@@ -1304,6 +1305,12 @@ static inline void set_speed_work_func(struct work_struct *work)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pdata->oldlink) {
|
||||||
|
pdata->oldlink = 1;
|
||||||
|
val = pdata->xstats.link_connect_count;
|
||||||
|
pdata->xstats.link_connect_count = update_stats_counter(val, 1UL);
|
||||||
|
}
|
||||||
|
|
||||||
/* Set MGBE MAC_DIV/TX clk rate */
|
/* Set MGBE MAC_DIV/TX clk rate */
|
||||||
pdata->speed = speed;
|
pdata->speed = speed;
|
||||||
phy_print_status(phydev);
|
phy_print_status(phydev);
|
||||||
|
|||||||
Reference in New Issue
Block a user