Re: [PATCH net] net: don't require the hwtstamp NDOs when a PHY provides timestamping

From: Kory Maincent

Date: Fri Sep 18 2026 - 19:26:55 EST



On 9/18/26 11:55, Nicolai Buchwitz wrote:
Removing the legacy ioctl fallback made both hwtstamp NDOs mandatory. A
device that only timestamps in its PHY implements neither, so
SIOCSHWTSTAMP fails with EOPNOTSUPP before anything looks at the PHY and
PTP stops working there.

The check only ever picked the legacy path. That path is gone, so drop it
and test where the NDOs are actually called.

SIOCGHWTSTAMP is new here, not restored. The old path went through
phy_mii_ioctl(), which only handled SIOCSHWTSTAMP.

Such a device now returns -ENODEV while absent instead of -EOPNOTSUPP,
like the ones that do implement the NDOs.

Fixes: 5062245a5a7f ("net: remove legacy way to get/set HW timestamp config")
Signed-off-by: Nicolai Buchwitz <nb@xxxxxxxxxxx>

Reviewed-by: Kory Maincent <kory.maincent@xxxxxxxxxxx>

Thank you!
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com