mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 11:17:18 +07:00
net: axienet: Support phy-less mode of operation
This patch adds proper checks to handle the PHY-less case. Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f080a8c35d
commit
d7cc3163e0
@ -940,11 +940,10 @@ static int axienet_open(struct net_device *ndev)
|
|||||||
PHY_INTERFACE_MODE_RGMII_ID);
|
PHY_INTERFACE_MODE_RGMII_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lp->phy_dev) {
|
if (!lp->phy_dev)
|
||||||
dev_err(lp->dev, "of_phy_connect() failed\n");
|
dev_err(lp->dev, "of_phy_connect() failed\n");
|
||||||
return -ENODEV;
|
else
|
||||||
}
|
phy_start(lp->phy_dev);
|
||||||
phy_start(lp->phy_dev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable tasklets for Axi DMA error handling */
|
/* Enable tasklets for Axi DMA error handling */
|
||||||
@ -1606,7 +1605,8 @@ static int axienet_of_probe(struct platform_device *op)
|
|||||||
lp->coalesce_count_tx = XAXIDMA_DFT_TX_THRESHOLD;
|
lp->coalesce_count_tx = XAXIDMA_DFT_TX_THRESHOLD;
|
||||||
|
|
||||||
lp->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0);
|
lp->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0);
|
||||||
ret = axienet_mdio_setup(lp, op->dev.of_node);
|
if (lp->phy_node)
|
||||||
|
ret = axienet_mdio_setup(lp, op->dev.of_node);
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_warn(&op->dev, "error registering MDIO bus\n");
|
dev_warn(&op->dev, "error registering MDIO bus\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user