Re: [RFC PATCH net-next 6/9] net: mdio: add Airoha EN8811H MDIO device driver
From: Andrew Lunn
Date: Thu Sep 03 2026 - 21:37:17 EST
> +
> +#include "../phy/air_phy_lib.h"
We try to avoid such paths. Please use include/net/phy/
> +static void en8811h_mcu_fw_poll(struct work_struct *work)
> +{
> + struct en8811h_mcu *mcu = container_of(to_delayed_work(work),
> + struct en8811h_mcu, fw_poll);
> + struct device *dev = &mcu->mdiodev->dev;
> + int ret;
> +
> + /* The chip enumerates as a C22 PHY; MMD access is indirect */
This is an mdiodev. It is not enumerated. It is explicitly listed as a
device on the bus with a compatible.
C45 over C22 is a PHY concept, not an mdio device concept. In this
case, this mdio device is special and does implement C45 over C22. But
it is up to use to this driver to decided if you want to use it. I
would probably look as bus->read_c45, and if it is not NULL use
direct.
I wounder if there are any boards using this devices which are not
capable of direct?
> + mcu->waited_ms += mcu->poll_ms;
> + if (!mcu->warned && mcu->waited_ms >= EN8811H_FW_WARN_MS) {
> + /* Missing files resolve by themselves once installed; a bus
> + * or register error will not, and deserves its own message.
> + */
> + if (ret == -ENOENT)
> + dev_warn(dev, "still waiting for %s and %s\n",
> + EN8811H_MD32_DM, EN8811H_MD32_DSP);
> + else
> + dev_warn(dev, "firmware download keeps failing: %pe\n",
> + ERR_PTR(ret));
dev_warn_once().
Andrew