Skip to content

Commit

Permalink
lan78xx: Check device ready bit (PMT_CTL_READY_) after reset the PHY
Browse files Browse the repository at this point in the history
Check device ready bit (PMT_CTL_READY_) after reset the PHY.
Device may not be ready even if PHY_RST_ is cleared depends on configuration.

Signed-off-by: Woojung Huh <woojung.huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Woojung.Huh@microchip.com authored and David S. Miller committed Sep 18, 2015
1 parent bde6f9d commit 6c595b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/lan78xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ static int lan78xx_reset(struct lan78xx_net *dev)
netdev_warn(dev->net, "timeout waiting for PHY Reset");
return -EIO;
}
} while (buf & PMT_CTL_PHY_RST_);
} while ((buf & PMT_CTL_PHY_RST_) || !(buf & PMT_CTL_READY_));

lan78xx_mii_init(dev);

Expand Down

0 comments on commit 6c595b0

Please sign in to comment.