diff mbox series

[1/2] ax88796c: fix ioctl callback

Message ID 20211105092954.1771974-1-arnd@kernel.org (mailing list archive)
State Accepted
Commit 9dcc00715a7c0aea0d3afe1e935f4b4aefbeb294
Delegated to: Netdev Maintainers
Headers show
Series [1/2] ax88796c: fix ioctl callback | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Arnd Bergmann Nov. 5, 2021, 9:29 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

The timestamp ioctls are now handled by the ndo_eth_ioctl() callback,
not the old ndo_do_ioctl(), but oax88796 introduced the
function for the old way.

Move it over to ndo_eth_ioctl() to actually allow calling it from
user space.

Fixes: a97c69ba4f30 ("net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver")
Fixes: a76053707dbf ("dev_ioctl: split out ndo_eth_ioctl")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
It would be best to completely remove the .ndo_do_ioctl() callback
to avoid this problem in the future, but I'm still unsure whether
we want to just remove the ancient wireless and localtalk drivers
instead of fixing them.
---
 drivers/net/ethernet/asix/ax88796c_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lukasz Stelmach Nov. 5, 2021, 1:19 p.m. UTC | #1
It was <2021-11-05 pią 10:29>, when Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The timestamp ioctls are now handled by the ndo_eth_ioctl() callback,

Actually neither the driver nor the chip support
timstamping. ax88796c_ioctl() simply wraps phy_mii_ioctl(). I believe
you swapped commit messages between this and the other patch in the
series.

> not the old ndo_do_ioctl(), but oax88796 introduced the
                                 ^^^ 
Typo here. 

> function for the old way.

At first I though — What did I mess up again? But then saw a76053707dbf
is quite a new thing and ndo_do_ioctl() is still there, so my builds
didn't fail. Thanks, for the patch.

> Move it over to ndo_eth_ioctl() to actually allow calling it from
> user space.
>
> Fixes: a97c69ba4f30 ("net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver")
> Fixes: a76053707dbf ("dev_ioctl: split out ndo_eth_ioctl")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> It would be best to completely remove the .ndo_do_ioctl() callback
> to avoid this problem in the future, but I'm still unsure whether
> we want to just remove the ancient wireless and localtalk drivers
> instead of fixing them.
> ---
>  drivers/net/ethernet/asix/ax88796c_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Acked-by: Lukasz Stelmach <l.stelmach@samsung.com>

> diff --git a/drivers/net/ethernet/asix/ax88796c_main.c b/drivers/net/ethernet/asix/ax88796c_main.c
> index 4b0c5a09fd57..8994f2322268 100644
> --- a/drivers/net/ethernet/asix/ax88796c_main.c
> +++ b/drivers/net/ethernet/asix/ax88796c_main.c
> @@ -934,7 +934,7 @@ static const struct net_device_ops ax88796c_netdev_ops = {
>  	.ndo_stop		= ax88796c_close,
>  	.ndo_start_xmit		= ax88796c_start_xmit,
>  	.ndo_get_stats64	= ax88796c_get_stats64,
> -	.ndo_do_ioctl		= ax88796c_ioctl,
> +	.ndo_eth_ioctl		= ax88796c_ioctl,
>  	.ndo_set_mac_address	= eth_mac_addr,
>  	.ndo_set_features	= ax88796c_set_features,
>  };
patchwork-bot+netdevbpf@kernel.org Nov. 5, 2021, 2:30 p.m. UTC | #2
Hello:

This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri,  5 Nov 2021 10:29:39 +0100 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The timestamp ioctls are now handled by the ndo_eth_ioctl() callback,
> not the old ndo_do_ioctl(), but oax88796 introduced the
> function for the old way.
> 
> Move it over to ndo_eth_ioctl() to actually allow calling it from
> user space.
> 
> [...]

Here is the summary with links:
  - [1/2] ax88796c: fix ioctl callback
    https://git.kernel.org/netdev/net/c/9dcc00715a7c
  - [2/2] octeontx2-nicvf: fix ioctl callback
    https://git.kernel.org/netdev/net/c/a6785bd7d83c

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/asix/ax88796c_main.c b/drivers/net/ethernet/asix/ax88796c_main.c
index 4b0c5a09fd57..8994f2322268 100644
--- a/drivers/net/ethernet/asix/ax88796c_main.c
+++ b/drivers/net/ethernet/asix/ax88796c_main.c
@@ -934,7 +934,7 @@  static const struct net_device_ops ax88796c_netdev_ops = {
 	.ndo_stop		= ax88796c_close,
 	.ndo_start_xmit		= ax88796c_start_xmit,
 	.ndo_get_stats64	= ax88796c_get_stats64,
-	.ndo_do_ioctl		= ax88796c_ioctl,
+	.ndo_eth_ioctl		= ax88796c_ioctl,
 	.ndo_set_mac_address	= eth_mac_addr,
 	.ndo_set_features	= ax88796c_set_features,
 };