From nobody Sat Jul 25 04:30:08 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 760D13CF942 for ; Sat, 18 Jul 2026 14:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784385850; cv=none; b=TdkMzukJRHD8IJ7ZS6+4Tvu8fZpYtXIt2KSG+IHfKPLm+v6ufPmclkWMPsUkvugGZXNnhkYRqwISL8KK2BR69pGSr16nPkNCptbVCGxncSvcfaBk81QiQduQIdmHfNLnhCFNnXY0Yv9y975flD05R89UiBPSDMnCXcTMT/S2BYw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784385850; c=relaxed/simple; bh=I6CzJ+JDKjRxZu3r96ktIWuesBGUDKfrC8qrCqZn4Es=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BejjnInl1NWTo9105BPSuXxYdRMAbJZFp3hFMY2lo5IQ20Hs6tX0WyMd0isumq9HYC4Qgm9f+5jBur5xMWmGTnctLd6K7XR1KmZ9ArwMqjyJMv2FuGB9NcRrq/rLPnqNjkx1fegH200EjtGdT+yXC4th2zsTtDpzwt9Q2G9joMQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=O2PCNXAz; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="O2PCNXAz" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 488C61A10A4; Sat, 18 Jul 2026 14:38:57 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 07D3960363; Sat, 18 Jul 2026 14:38:57 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E1D8211BD0158; Sat, 18 Jul 2026 16:38:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1784385535; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=x9V6cBq+TtwXJYqhnu6T1q5wgsLXdHrhThBITkOay1U=; b=O2PCNXAzjDUrE5AmaW/q2eCL+nLSBYwFFKEWvlyvm+Y+GElh/6Y+NNsT1xBrUUMgFOAO9l sowywpbcNketelv260cm8YiILm5yo+rjCmXvNQi1MdB9p7b2KhMbz2IzRahNTQxKUp7VdE qZ1Iiu31ZZzwffSLcUaxraJX7ngXNYC54lNClCHis/OQH/ebGYxxYV2+ZBdseMsIcv8pB2 WbTtSOTST/T8lT1of7CTBQ90w/vq3Rmz4N+BZHukMAJoH/DI9SkM291BSfJtqlLLOm4R0n wtyR76iPOdtTIwuBb1Z+Po0Ee2xZgswjDwrTt+e8Tjc0RJDUPMm6wBUQQpXUvw== From: Maxime Chevallier To: Andrew Lunn , Jakub Kicinski , davem@davemloft.net, Eric Dumazet , Paolo Abeni , Simon Horman , Maxime Coquelin , Alexandre Torgue , Russell King Cc: Maxime Chevallier , thomas.petazzoni@bootlin.com, =?UTF-8?q?Alexis=20Lothor=C3=A9?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH net-next] net: stmmac: Simplify ioctl handling Date: Sat, 18 Jul 2026 16:38:47 +0200 Message-ID: <20260718143848.677531-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Now that timestamping is controlled through an NDO, we can simply call phylink_mii_ioctl() to handle ioctls. The only functional difference is that phylink_mii_ioctl() -> phy_mii_ioctl() can handle SIOCSHWTSTAMP, but this no longer happens as this ioctl is not longer dispatched to the ndo_eth_ioctl(). Signed-off-by: Maxime Chevallier Reviewed-by: Vadim Fedorenko --- Looking at this, I'm wondering if we can't just get rid of SIOCSHWTSTAMP handling in phy_mii_ioctl(). Looks like we can ? .../net/ethernet/stmicro/stmmac/stmmac_main.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/ne= t/ethernet/stmicro/stmmac/stmmac_main.c index 2a0d7eff88d3..562d20830b94 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6371,28 +6371,17 @@ static irqreturn_t stmmac_msi_intr_rx(int irq, void= *data) * @rq: An IOCTL specific structure, that can contain a pointer to * a proprietary structure used to pass information to the driver. * @cmd: IOCTL command - * Description: - * Currently it supports the phy_mii_ioctl(...) and HW time stamping. + * Description: Forward the PHY ioctls to phylink + * Return: Zero on success or negative error code. */ static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { struct stmmac_priv *priv =3D netdev_priv (dev); - int ret =3D -EOPNOTSUPP; =20 if (!netif_running(dev)) return -EINVAL; =20 - switch (cmd) { - case SIOCGMIIPHY: - case SIOCGMIIREG: - case SIOCSMIIREG: - ret =3D phylink_mii_ioctl(priv->phylink, rq, cmd); - break; - default: - break; - } - - return ret; + return phylink_mii_ioctl(priv->phylink, rq, cmd); } =20 static int stmmac_setup_tc_block_cb(enum tc_setup_type type, void *type_da= ta, --=20 2.55.0