nvethernet: allow PHY read/write if MAC clks enabled

Issue: During system suspend, PHY framework is trying to
access the PHY registers even though the ethernet interface
is not up which inturn causing the bus errors since MAC clocks
not enabled.

Fix: Add MAC clocks enable check before accessing the PHY
registers through MDIO bus.

Bug 200548320

Change-Id: Ic85ae82bbc7e7f33203cc94f8407bdfd23f75502
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2187285
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Narayan Reddy
2019-08-30 22:10:57 +05:30
committed by Revanth Kumar Uppala
parent 9b7d91fdcb
commit e97dbc8de1
2 changed files with 17 additions and 0 deletions

View File

@@ -298,6 +298,8 @@ struct ether_priv_data {
unsigned int max_platform_mtu;
/** Spin lock for PTP registers */
raw_spinlock_t ptp_lock;
/** Clocks enable check */
bool clks_enable;
};
/**