From 9d2f0610c1c0994c19bc6af3ece4eafe1f578b44 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Wed, 22 Apr 2026 13:19:24 -0400 Subject: [PATCH] Revert "net: ethernet: xscale: Check for PTP support properly" This reverts commit 5195b10c34b8993194ad12ad7d8f54d861be084b. Signed-off-by: Sasha Levin --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 5 ++++- drivers/net/ethernet/xscale/ptp_ixp46x.c | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c index aa6d30dd35c3..a5e03e66cfd3 100644 --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c @@ -395,12 +395,15 @@ static int ixp4xx_hwtstamp_set(struct net_device *netdev, int ret; int ch; + if (!cpu_is_ixp46x()) + return -EOPNOTSUPP; + if (!netif_running(netdev)) return -EINVAL; ret = ixp46x_ptp_find(&port->timesync_regs, &port->phc_index); if (ret) - return -EOPNOTSUPP; + return ret; ch = PORT2CHANNEL(port); regs = port->timesync_regs; diff --git a/drivers/net/ethernet/xscale/ptp_ixp46x.c b/drivers/net/ethernet/xscale/ptp_ixp46x.c index b8953745a9f2..9abbdb71e629 100644 --- a/drivers/net/ethernet/xscale/ptp_ixp46x.c +++ b/drivers/net/ethernet/xscale/ptp_ixp46x.c @@ -243,9 +243,6 @@ static struct ixp_clock ixp_clock; int ixp46x_ptp_find(struct ixp46x_ts_regs *__iomem *regs, int *phc_index) { - if (!cpu_is_ixp46x()) - return -ENODEV; - *regs = ixp_clock.regs; *phc_index = ptp_clock_index(ixp_clock.ptp_clock);