mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-28 23:23:30 +08:00
net: xilinx: axi_emac: Fix endless loop when no PHYs are connected
The index used to iterate over the possible PHYs in axiemac_phy_init was an unsigned int and decremented. Therefor it was always >= 0 and never exited the loop. Signed-off-by: Patrick van Gelder <patrick.vangelder@nl.bosch.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
6b3984c631
commit
945a55050d
@ -244,7 +244,8 @@ static u32 phywrite(struct axidma_priv *priv, u32 phyaddress, u32 registernum,
|
|||||||
static int axiemac_phy_init(struct udevice *dev)
|
static int axiemac_phy_init(struct udevice *dev)
|
||||||
{
|
{
|
||||||
u16 phyreg;
|
u16 phyreg;
|
||||||
u32 i, ret;
|
int i;
|
||||||
|
u32 ret;
|
||||||
struct axidma_priv *priv = dev_get_priv(dev);
|
struct axidma_priv *priv = dev_get_priv(dev);
|
||||||
struct axi_regs *regs = priv->iobase;
|
struct axi_regs *regs = priv->iobase;
|
||||||
struct phy_device *phydev;
|
struct phy_device *phydev;
|
||||||
|
Loading…
Reference in New Issue
Block a user