linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ax88796c: fix ioctl callback
@ 2021-11-05  9:29 Arnd Bergmann
  2021-11-05  9:29 ` [PATCH 2/2] octeontx2-nicvf: " Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-11-05  9:29 UTC (permalink / raw)
  To: Łukasz Stelmach, David S. Miller, Jakub Kicinski,
	Jason Gunthorpe, Arnd Bergmann
  Cc: Nathan Chancellor, Alexander Lobakin, netdev, linux-kernel

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(-)

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,
 };
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] octeontx2-nicvf: fix ioctl callback
  2021-11-05  9:29 [PATCH 1/2] ax88796c: fix ioctl callback Arnd Bergmann
@ 2021-11-05  9:29 ` Arnd Bergmann
       [not found] ` <CGME20211105131932eucas1p284bdb650732ceff3c8326ed578f22b1a@eucas1p2.samsung.com>
  2021-11-05 14:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-11-05  9:29 UTC (permalink / raw)
  To: Sunil Goutham, Geetha sowjanya, Subbaraya Sundeep, hariprasad,
	David S. Miller, Jakub Kicinski, Naveen Mamindlapalli,
	Jason Gunthorpe, Arnd Bergmann
  Cc: Rakesh Babu, Sunil Kovvuri Goutham, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The mii ioctls are now handled by the ndo_eth_ioctl() callback,
not the old ndo_do_ioctl(), but octeontx2-nicvf introduced the
function for the old way.

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

Fixes: 43510ef4ddad ("octeontx2-nicvf: Add PTP hardware clock support to NIX VF")
Fixes: a76053707dbf ("dev_ioctl: split out ndo_eth_ioctl")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
index e6cb8cd0787d..78944ad3492f 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
@@ -501,7 +501,7 @@ static const struct net_device_ops otx2vf_netdev_ops = {
 	.ndo_set_features = otx2vf_set_features,
 	.ndo_get_stats64 = otx2_get_stats64,
 	.ndo_tx_timeout = otx2_tx_timeout,
-	.ndo_do_ioctl	= otx2_ioctl,
+	.ndo_eth_ioctl	= otx2_ioctl,
 };
 
 static int otx2_wq_init(struct otx2_nic *vf)
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ax88796c: fix ioctl callback
       [not found] ` <CGME20211105131932eucas1p284bdb650732ceff3c8326ed578f22b1a@eucas1p2.samsung.com>
@ 2021-11-05 13:19   ` Lukasz Stelmach
  0 siblings, 0 replies; 4+ messages in thread
From: Lukasz Stelmach @ 2021-11-05 13:19 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David S. Miller, Jakub Kicinski, Jason Gunthorpe, Arnd Bergmann,
	Nathan Chancellor, Alexander Lobakin, netdev, linux-kernel,
	Marek Szyprowski

[-- Attachment #1: Type: text/plain, Size: 2101 bytes --]

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,
>  };

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ax88796c: fix ioctl callback
  2021-11-05  9:29 [PATCH 1/2] ax88796c: fix ioctl callback Arnd Bergmann
  2021-11-05  9:29 ` [PATCH 2/2] octeontx2-nicvf: " Arnd Bergmann
       [not found] ` <CGME20211105131932eucas1p284bdb650732ceff3c8326ed578f22b1a@eucas1p2.samsung.com>
@ 2021-11-05 14:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-05 14:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: l.stelmach, davem, kuba, jgg, arnd, nathan, alobakin, netdev,
	linux-kernel

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-05 14:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05  9:29 [PATCH 1/2] ax88796c: fix ioctl callback Arnd Bergmann
2021-11-05  9:29 ` [PATCH 2/2] octeontx2-nicvf: " Arnd Bergmann
     [not found] ` <CGME20211105131932eucas1p284bdb650732ceff3c8326ed578f22b1a@eucas1p2.samsung.com>
2021-11-05 13:19   ` [PATCH 1/2] ax88796c: " Lukasz Stelmach
2021-11-05 14:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).