mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
Lan743x - fix SC7 resume
Incorporate fixes from bug 4071996 and 3457173 To fix issue with userland phy driver interface during sc7 resume Bug 4172302 Change-Id: I827be437172ed1992baa724149fb39dd1e1f92ac Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2932422 Tested-by: Jeremy Alves <jalves@nvidia.com> Reviewed-by: Jeremy Alves <jalves@nvidia.com> Reviewed-by: Praveen Ishwar Bajantri <pbajantri@nvidia.com> Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
a922b344f8
commit
10ac600b18
@@ -1006,11 +1006,17 @@ static int lan743x_phy_open(struct lan743x_adapter *adapter)
|
|||||||
struct net_device *netdev = adapter->netdev;
|
struct net_device *netdev = adapter->netdev;
|
||||||
struct lan743x_phy *phy = &adapter->phy;
|
struct lan743x_phy *phy = &adapter->phy;
|
||||||
struct phy_device *phydev;
|
struct phy_device *phydev;
|
||||||
|
struct device_node *phynode;
|
||||||
|
|
||||||
int ret = -EIO;
|
int ret = -EIO;
|
||||||
|
|
||||||
/* try devicetree phy, or fixed link */
|
phynode = of_node_get(adapter->pdev->dev.of_node);
|
||||||
phydev = of_phy_get_and_connect(netdev, adapter->pdev->dev.of_node,
|
|
||||||
lan743x_phy_link_status_change);
|
if (phynode) {
|
||||||
|
phydev = of_phy_connect(netdev, phynode,
|
||||||
|
lan743x_phy_link_status_change, 0,
|
||||||
|
adapter->phy_mode);
|
||||||
|
}
|
||||||
|
|
||||||
if (!phydev) {
|
if (!phydev) {
|
||||||
/* try internal phy */
|
/* try internal phy */
|
||||||
@@ -1025,6 +1031,10 @@ static int lan743x_phy_open(struct lan743x_adapter *adapter)
|
|||||||
goto return_error;
|
goto return_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*phydev is assigned by now*/
|
||||||
|
/*Skip the device resume via mdio bus */
|
||||||
|
phydev->mac_managed_pm = true;
|
||||||
|
|
||||||
/* MAC doesn't support 1000T Half */
|
/* MAC doesn't support 1000T Half */
|
||||||
phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
|
phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user