Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a209bed6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: emac: Avoid MDIO access in suspended state"

parents 17d14e63 82d8d446
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -78,6 +78,12 @@ static int emac_mdio_read(struct mii_bus *bus, int addr, int regnum)
	u32 reg = 0;
	int ret = 0;

	if (pm_runtime_enabled(adpt->netdev->dev.parent) &&
	    pm_runtime_status_suspended(adpt->netdev->dev.parent)) {
		emac_dbg(adpt, hw, "EMAC in suspended state\n");
		return ret;
	}

	if (phy->external) {
		ret = emac_phy_mdio_autopoll_disable(hw);
		if (ret) {
@@ -128,6 +134,12 @@ static int emac_mdio_write(struct mii_bus *bus, int addr, int regnum, u16 val)
	u32 reg = 0;
	int ret = 0;

	if (pm_runtime_enabled(adpt->netdev->dev.parent) &&
	    pm_runtime_status_suspended(adpt->netdev->dev.parent)) {
		emac_dbg(adpt, hw, "EMAC in suspended state\n");
		return ret;
	}

	if (phy->external) {
		ret = emac_phy_mdio_autopoll_disable(hw);
		if (ret) {