Commit 9da34f27 authored by Timur Tabi's avatar Timur Tabi Committed by David S. Miller

net: qcom/emac: display the phy driver info after we connect

The PHY driver is attached only when the driver calls
phy_connect_direct().  Calling phy_attached_print() to display
information about the PHY driver prior to that point is meaningless.
The interface can be brought down, a new PHY driver can be loaded,
and the interface then brought back up.  This is the correct time
to display information about the attached driver.

Since phy_attached_print() also prints information about the
interrupt, that needs to be set as well.
Signed-off-by: default avatarTimur Tabi <timur@codeaurora.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b8784aa
...@@ -981,6 +981,7 @@ int emac_mac_up(struct emac_adapter *adpt) ...@@ -981,6 +981,7 @@ int emac_mac_up(struct emac_adapter *adpt)
emac_mac_config(adpt); emac_mac_config(adpt);
emac_mac_rx_descs_refill(adpt, &adpt->rx_q); emac_mac_rx_descs_refill(adpt, &adpt->rx_q);
adpt->phydev->irq = PHY_IGNORE_INTERRUPT;
ret = phy_connect_direct(netdev, adpt->phydev, emac_adjust_link, ret = phy_connect_direct(netdev, adpt->phydev, emac_adjust_link,
PHY_INTERFACE_MODE_SGMII); PHY_INTERFACE_MODE_SGMII);
if (ret) { if (ret) {
...@@ -988,11 +989,12 @@ int emac_mac_up(struct emac_adapter *adpt) ...@@ -988,11 +989,12 @@ int emac_mac_up(struct emac_adapter *adpt)
return ret; return ret;
} }
phy_attached_print(adpt->phydev, NULL);
/* enable mac irq */ /* enable mac irq */
writel((u32)~DIS_INT, adpt->base + EMAC_INT_STATUS); writel((u32)~DIS_INT, adpt->base + EMAC_INT_STATUS);
writel(adpt->irq.mask, adpt->base + EMAC_INT_MASK); writel(adpt->irq.mask, adpt->base + EMAC_INT_MASK);
adpt->phydev->irq = PHY_IGNORE_INTERRUPT;
phy_start(adpt->phydev); phy_start(adpt->phydev);
napi_enable(&adpt->rx_q.napi); napi_enable(&adpt->rx_q.napi);
......
...@@ -226,8 +226,5 @@ int emac_phy_config(struct platform_device *pdev, struct emac_adapter *adpt) ...@@ -226,8 +226,5 @@ int emac_phy_config(struct platform_device *pdev, struct emac_adapter *adpt)
return -ENODEV; return -ENODEV;
} }
if (adpt->phydev->drv)
phy_attached_print(adpt->phydev, NULL);
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment