Re: [PATCH net-next v2 3/6] net: ftgmac100: Enable AST2700 RMII support

From: Andrew Lunn

Date: Tue Oct 06 2026 - 12:36:43 EST


> static void ftgmac100_start_hw(struct ftgmac100 *priv)
> {
> u32 maccr = ioread32(priv->base + FTGMAC100_OFFSET_MACCR);
> + struct phy_device *phydev = priv->netdev->phydev;

Is it safe to assume there is a phydev? The AI is better at this sort
of logic, but looking at ftgmac100_probe_dt() is think it is possible
to not have a phydev. And ftgmac100_phy_disconnect() does guard
against not having one.

Andrew