Re: [PATCH net] microchip: lan865x: fix missing ndo_eth_ioctl handler to support PHY ioctl

From: Parthiban.Veerasooran
Date: Fri Aug 22 2025 - 00:25:03 EST


Hi Andrew,

Thank you for reviewing this patch.

On 22/08/25 5:47 am, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Thu, Aug 21, 2025 at 01:58:32PM +0530, Parthiban Veerasooran wrote:
>> The LAN865x Ethernet driver is missing an .ndo_eth_ioctl implementation,
>> which is required to handle standard MII ioctl commands such as
>> SIOCGMIIREG and SIOCSMIIREG. These commands are used by userspace tools
>> (e.g., ethtool, mii-tool) to access and configure PHY registers.
>>
>> This patch adds the lan865x_eth_ioctl() function to pass ioctl calls to
>> the PHY layer via phy_mii_ioctl() when the interface is up.
>>
>> Without this handler, MII ioctl operations return -EINVAL, breaking PHY
>> diagnostics and configuration from userspace.
>
> I'm not sure this classes as a fix. This IOCTL is optional, not
> mandatory. Returning EINVAL is valid behaviour. So for me, this is
> just ongoing development work, adding more features to the driver.
>
> Please submit to net-next.
Sure I will submit it to net-next as it is a feature.

By the way, is there a possibility to submit or apply this patch to the
older stable kernels as well, so that users on those versions can also
benefit from this feature?

Best regards,
Parthiban V
>
> Andrew
>
> ---
> pw-bot: cr