NVIDIA: SAUCE: net: phy: aqr113c: skip PHY low power mode

BugLink: https://bugs.launchpad.net/bugs/2072591

Issue: Uncorrectable Errors are observed when the MGBE1
the interface is going down or in SC7 since PHY is put into
low power mode without powering the UPHY lanes and
UPHY lanes can't be power down in ethernet server enabled
case where lanes are shared with other VF's.

Fix: Skip PHY low power mode in automotive platforms.

http://nvbugs/3683205

Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Tested-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Jacob Martin <jacob.martin@canonical.com>
Acked-by: Noah Wager <noah.wager@canonical.com>
Signed-off-by: Noah Wager <noah.wager@canonical.com>
This commit is contained in:
Bhadram Varka
2022-11-18 11:31:45 +05:30
committed by Noah Wager
parent f0fbb4928b
commit 874a28a4f9
+18
View File
@@ -227,6 +227,7 @@ struct aqr107_priv {
int led_mode1;
int led_mode2;
int wol_status;
bool skip_lpm; /* skip low power mode */
};
static int aqr107_get_sset_count(struct phy_device *phydev)
@@ -951,8 +952,12 @@ static int aqr107_get_rate_matching(struct phy_device *phydev,
static int aqr107_suspend(struct phy_device *phydev)
{
struct aqr107_priv *priv = phydev->priv;
int err;
if (priv->skip_lpm)
return 0;
err = phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, MDIO_CTRL1,
MDIO_CTRL1_LPOWER);
if (err)
@@ -963,8 +968,12 @@ static int aqr107_suspend(struct phy_device *phydev)
static int aqr107_resume(struct phy_device *phydev)
{
struct aqr107_priv *priv = phydev->priv;
int err;
if (priv->skip_lpm)
return 0;
err = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1, MDIO_CTRL1,
MDIO_CTRL1_LPOWER);
if (err)
@@ -1049,6 +1058,8 @@ static int aqr113c_config_init(struct phy_device *phydev)
static int aqr107_probe(struct phy_device *phydev)
{
struct device_node *node = phydev->mdio.dev.of_node;
struct aqr107_priv *priv;
int ret;
phydev->priv = devm_kzalloc(&phydev->mdio.dev,
@@ -1059,6 +1070,13 @@ static int aqr107_probe(struct phy_device *phydev)
ret = aqr_firmware_load(phydev);
if (ret)
return ret;
priv = phydev->priv;
if (of_property_read_bool(node, "aquantia,skip-lpm"))
priv->skip_lpm = true;
else
priv->skip_lpm = false;
aqr_read_led_mode_cfg(phydev);
return aqr_hwmon_probe(phydev);