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:
Jeremy Alves
2023-06-30 22:21:13 -07:00
committed by mobile promotions
parent a922b344f8
commit 10ac600b18

View File

@@ -1006,11 +1006,17 @@ static int lan743x_phy_open(struct lan743x_adapter *adapter)
struct net_device *netdev = adapter->netdev;
struct lan743x_phy *phy = &adapter->phy;
struct phy_device *phydev;
struct device_node *phynode;
int ret = -EIO;
/* try devicetree phy, or fixed link */
phydev = of_phy_get_and_connect(netdev, adapter->pdev->dev.of_node,
lan743x_phy_link_status_change);
phynode = of_node_get(adapter->pdev->dev.of_node);
if (phynode) {
phydev = of_phy_connect(netdev, phynode,
lan743x_phy_link_status_change, 0,
adapter->phy_mode);
}
if (!phydev) {
/* try internal phy */
@@ -1025,6 +1031,10 @@ static int lan743x_phy_open(struct lan743x_adapter *adapter)
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 */
phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT);