Skip to content

Commit

Permalink
net: phy: xilinx_gmii2rgmii: Add check for external phy detection
Browse files Browse the repository at this point in the history
Add check if an external phy is detected or not before proceeding
further to config the external phy. This patch fixes the issue of
u-boot hang or reset, if u-boot is not able to communicate with
external connected over gmiitorgmii bridge.

Signed-off-by: Siva Durga Prasad Paladugu <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
  • Loading branch information
Siva Durga Prasad Paladugu authored and Michal Simek committed Feb 27, 2019
1 parent e118bad commit 195c620
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/phy/xilinx_gmii2rgmii.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ static int xilinxgmiitorgmii_probe(struct phy_device *phydev)
1 << ext_phyaddr,
PHY_INTERFACE_MODE_RGMII);

if (!phydev->priv) {
printf("%s, No external phy device found\n", __func__);
return -EINVAL;
}

debug("%s, gmii2rgmmi:0x%x, extphy:0x%x\n", __func__, phydev->addr,
ext_phyaddr);

Expand Down

0 comments on commit 195c620

Please sign in to comment.