Re: [PATCH v4 3/5] net: phy: qcom: at803x: Add Qualcomm IPQ5018 Internal PHY support

From: Andrew Lunn
Date: Mon Jun 09 2025 - 08:30:41 EST


> -#include <linux/phy.h>
> -#include <linux/module.h>
> -#include <linux/string.h>
> -#include <linux/netdevice.h>
> +#include <linux/bitfield.h>
> +#include <linux/clk.h>
> +#include <linux/clk-provider.h>
> #include <linux/etherdevice.h>
> #include <linux/ethtool_netlink.h>
> -#include <linux/bitfield.h>
> -#include <linux/regulator/of_regulator.h>
> -#include <linux/regulator/driver.h>
> -#include <linux/regulator/consumer.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/module.h>
> +#include <linux/netdevice.h>
> #include <linux/of.h>
> +#include <linux/phy.h>
> #include <linux/phylink.h>
> +#include <linux/regmap.h>
> +#include <linux/regulator/consumer.h>
> +#include <linux/regulator/driver.h>
> +#include <linux/regulator/of_regulator.h>
> +#include <linux/reset.h>
> #include <linux/sfp.h>
> +#include <linux/string.h>
> #include <dt-bindings/net/qca-ar803x.h>

Please sort the headers in a separate patch. Cleanup and new features
are logically different things, so should not be mixed.

> +static void ipq5018_link_change_notify(struct phy_device *phydev)
> +{
> + mdiobus_modify_changed(phydev->mdio.bus, phydev->mdio.addr,
> + IPQ5018_PHY_FIFO_CONTROL, IPQ5018_PHY_FIFO_RESET,
> + phydev->link ? IPQ5018_PHY_FIFO_RESET : 0);
> +}


link_change_notify is pretty much only used when the PHY is broken. So
it would be good to add a comment what is happening here. Why does the
FIFO need to be reset?

Andrew