diff mbox series

net: ag71xx: use phylink_mii_ioctl

Message ID 20240807185918.5815-1-rosenp@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: ag71xx: use phylink_mii_ioctl | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 7 this patch: 7
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 2 blamed authors not CCed: linux@armlinux.org.uk o.rempel@pengutronix.de; 6 maintainers not CCed: linux@armlinux.org.uk edumazet@google.com kuba@kernel.org chris.snook@gmail.com pabeni@redhat.com o.rempel@pengutronix.de
netdev/build_clang success Errors and warnings before: 7 this patch: 7
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 7 this patch: 7
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 21 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Rosen Penev Aug. 7, 2024, 6:58 p.m. UTC
f1294617d2f38bd2b9f6cce516b0326858b61182 removed the custom function for
ndo_eth_ioctl and used the standard phy_do_ioctl which calls
phy_mii_ioctl. However since then, this driver was ported to phylink
where it makes more sense to call phylink_mii_ioctl.

Bring back custom function that calls phylink_mii_ioctl.

Fixes: 892e09153fa3 ("net: ag71xx: port to phylink")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/ethernet/atheros/ag71xx.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Andrew Lunn Aug. 7, 2024, 7:38 p.m. UTC | #1
On Wed, Aug 07, 2024 at 11:58:46AM -0700, Rosen Penev wrote:
> f1294617d2f38bd2b9f6cce516b0326858b61182 removed the custom function for
> ndo_eth_ioctl and used the standard phy_do_ioctl which calls
> phy_mii_ioctl. However since then, this driver was ported to phylink
> where it makes more sense to call phylink_mii_ioctl.
> 
> Bring back custom function that calls phylink_mii_ioctl.
> 
> Fixes: 892e09153fa3 ("net: ag71xx: port to phylink")

I don't think the fixes tag is justified. phy_do_ioctl() should work,
although i agree your change is the better way to do this. So for me,
this patch is an improvement, not a fix. Or have you seen a real
problem?

Please read:

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#netdev-faq

and mark this patch for net-next, without the Fixes tag.

    Andrew

---
pw-bot: cr
Rosen Penev Aug. 7, 2024, 8:02 p.m. UTC | #2
On Wed, Aug 7, 2024 at 12:38 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Wed, Aug 07, 2024 at 11:58:46AM -0700, Rosen Penev wrote:
> > f1294617d2f38bd2b9f6cce516b0326858b61182 removed the custom function for
> > ndo_eth_ioctl and used the standard phy_do_ioctl which calls
> > phy_mii_ioctl. However since then, this driver was ported to phylink
> > where it makes more sense to call phylink_mii_ioctl.
> >
> > Bring back custom function that calls phylink_mii_ioctl.
> >
> > Fixes: 892e09153fa3 ("net: ag71xx: port to phylink")
>
> I don't think the fixes tag is justified. phy_do_ioctl() should work,
> although i agree your change is the better way to do this. So for me,
> this patch is an improvement, not a fix. Or have you seen a real
> problem?
I have not no. I've just looked at other phylink drivers that seems to
be using phylink_mii_ioctl.
>
> Please read:
>
> https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#netdev-faq
>
> and mark this patch for net-next, without the Fixes tag.
Will do. As it would be for net-next, would it make sense to mark this
patch as v2?
>
>     Andrew
>
> ---
> pw-bot: cr
Andrew Lunn Aug. 7, 2024, 8:06 p.m. UTC | #3
> Will do. As it would be for net-next, would it make sense to mark this
> patch as v2?

Yes, always use a new version indicator. Humans use this as well as
tools to keep track of the different versions of a patch. Patches do
often move between different trees, as they are reviewed and
discussed, so the version is not scoped to the tree, but is unique
over Linux as a whole.

     Andrew
diff mbox series

Patch

diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
index 6fc4996c8131..e252eca985b1 100644
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
@@ -447,6 +447,13 @@  static void ag71xx_int_disable(struct ag71xx *ag, u32 ints)
 	ag71xx_cb(ag, AG71XX_REG_INT_ENABLE, ints);
 }
 
+static int ag71xx_do_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
+{
+	struct ag71xx *ag = netdev_priv(ndev);
+
+	return phylink_mii_ioctl(ag->phylink, ifr, cmd);
+}
+
 static void ag71xx_get_drvinfo(struct net_device *ndev,
 			       struct ethtool_drvinfo *info)
 {
@@ -1798,7 +1805,7 @@  static const struct net_device_ops ag71xx_netdev_ops = {
 	.ndo_open		= ag71xx_open,
 	.ndo_stop		= ag71xx_stop,
 	.ndo_start_xmit		= ag71xx_hard_start_xmit,
-	.ndo_eth_ioctl		= phy_do_ioctl,
+	.ndo_eth_ioctl		= ag71xx_do_ioctl,
 	.ndo_tx_timeout		= ag71xx_tx_timeout,
 	.ndo_change_mtu		= ag71xx_change_mtu,
 	.ndo_set_mac_address	= eth_mac_addr,