All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petko Manolov <petkan@nucleusys.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH net-next v3 14/31] net: usb: use ndo_siocdevprivate
Date: Wed, 28 Jul 2021 16:02:24 +0300	[thread overview]
Message-ID: <YQFVYN1yv8oJotEl@carbon> (raw)
In-Reply-To: <20210727134517.1384504-15-arnd@kernel.org>

On 21-07-27 15:45:00, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The pegasus and rtl8150 drivers use SIOCDEVPRIVATE ioctls
> to access their MII registers, in place of the normal
> commands. This is broken for all compat ioctls today.
> 
> Change to ndo_siocdevprivate to fix it.

Well, ACK i guess... :)


		Petko


> Cc: Petko Manolov <petkan@nucleusys.com>
> Cc: linux-usb@vger.kernel.org
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/net/usb/pegasus.c | 5 +++--
>  drivers/net/usb/rtl8150.c | 5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
> index 9a907182569c..0475ef0efdca 100644
> --- a/drivers/net/usb/pegasus.c
> +++ b/drivers/net/usb/pegasus.c
> @@ -987,7 +987,8 @@ static const struct ethtool_ops ops = {
>  	.set_link_ksettings = pegasus_set_link_ksettings,
>  };
>  
> -static int pegasus_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
> +static int pegasus_siocdevprivate(struct net_device *net, struct ifreq *rq,
> +				  void __user *udata, int cmd)
>  {
>  	__u16 *data = (__u16 *) &rq->ifr_ifru;
>  	pegasus_t *pegasus = netdev_priv(net);
> @@ -1245,7 +1246,7 @@ static int pegasus_resume(struct usb_interface *intf)
>  static const struct net_device_ops pegasus_netdev_ops = {
>  	.ndo_open =			pegasus_open,
>  	.ndo_stop =			pegasus_close,
> -	.ndo_do_ioctl =			pegasus_ioctl,
> +	.ndo_siocdevprivate =		pegasus_siocdevprivate,
>  	.ndo_start_xmit =		pegasus_start_xmit,
>  	.ndo_set_rx_mode =		pegasus_set_multicast,
>  	.ndo_tx_timeout =		pegasus_tx_timeout,
> diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
> index 7656f2a3afd9..4a1b0e0fc3a3 100644
> --- a/drivers/net/usb/rtl8150.c
> +++ b/drivers/net/usb/rtl8150.c
> @@ -822,7 +822,8 @@ static const struct ethtool_ops ops = {
>  	.get_link_ksettings = rtl8150_get_link_ksettings,
>  };
>  
> -static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
> +static int rtl8150_siocdevprivate(struct net_device *netdev, struct ifreq *rq,
> +				  void __user *udata, int cmd)
>  {
>  	rtl8150_t *dev = netdev_priv(netdev);
>  	u16 *data = (u16 *) & rq->ifr_ifru;
> @@ -850,7 +851,7 @@ static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
>  static const struct net_device_ops rtl8150_netdev_ops = {
>  	.ndo_open		= rtl8150_open,
>  	.ndo_stop		= rtl8150_close,
> -	.ndo_do_ioctl		= rtl8150_ioctl,
> +	.ndo_siocdevprivate	= rtl8150_siocdevprivate,
>  	.ndo_start_xmit		= rtl8150_start_xmit,
>  	.ndo_tx_timeout		= rtl8150_tx_timeout,
>  	.ndo_set_rx_mode	= rtl8150_set_multicast,
> -- 
> 2.29.2
> 
> 

  reply	other threads:[~2021-07-28 13:29 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 13:44 [PATCH net-next v3 00/31] ndo_ioctl rework Arnd Bergmann
2021-07-27 13:44 ` [Bridge] " Arnd Bergmann
2021-07-27 13:44 ` Arnd Bergmann
2021-07-27 13:44 ` Arnd Bergmann
2021-07-27 13:44 ` Arnd Bergmann
2021-07-27 13:44 ` Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 01/31] net: split out SIOCDEVPRIVATE handling from dev_ioctl Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 02/31] staging: rtlwifi: use siocdevprivate Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 03/31] staging: wlan-ng: " Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 04/31] hostap: use ndo_siocdevprivate Arnd Bergmann
2021-07-28  7:07   ` Kalle Valo
2021-07-27 13:44 ` [PATCH net-next v3 05/31] bridge: " Arnd Bergmann
2021-07-27 13:44   ` [Bridge] " Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 06/31] phonet: use siocdevprivate Arnd Bergmann
2021-07-27 16:03   ` Rémi Denis-Courmont
2021-07-27 13:44 ` [PATCH net-next v3 07/31] tulip: use ndo_siocdevprivate Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 08/31] bonding: use siocdevprivate Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 09/31] appletalk: use ndo_siocdevprivate Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 10/31] hamachi: " Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 11/31] tehuti: " Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 12/31] eql: " Arnd Bergmann
2021-07-27 13:44 ` [PATCH net-next v3 13/31] fddi: " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 14/31] net: usb: " Arnd Bergmann
2021-07-28 13:02   ` Petko Manolov [this message]
2021-07-27 13:45 ` [PATCH net-next v3 15/31] slip/plip: " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 16/31] qeth: " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 17/31] cxgb3: " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 18/31] hamradio: " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 19/31] airo: " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 20/31] ip_tunnel: " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 21/31] hippi: " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 22/31] sb1000: " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 23/31] ppp: " Arnd Bergmann
2021-07-27 13:45   ` Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 24/31] wan: " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 25/31] wan: cosa: remove dead cosa_net_ioctl() function Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 26/31] dev_ioctl: pass SIOCDEVPRIVATE data separately Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 27/31] dev_ioctl: split out ndo_eth_ioctl Arnd Bergmann
2021-07-27 16:30   ` Jason Gunthorpe
2021-07-27 13:45 ` [PATCH net-next v3 28/31] net: split out ndo_siowandev ioctl Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 29/31] net: socket: return changed ifreq from SIOCDEVPRIVATE Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 30/31] net: bridge: move bridge ioctls out of .ndo_do_ioctl Arnd Bergmann
2021-07-27 13:45   ` [Bridge] " Arnd Bergmann
2021-07-27 13:45 ` [PATCH net-next v3 31/31] net: bonding: move ioctl handling to private ndo operation Arnd Bergmann
2021-07-27 19:59 ` [PATCH net-next v3 00/31] ndo_ioctl rework patchwork-bot+netdevbpf
2021-07-27 20:00   ` [Bridge] " patchwork-bot+netdevbpf
2021-07-27 20:00   ` patchwork-bot+netdevbpf
2021-07-27 20:00   ` patchwork-bot+netdevbpf
2021-07-27 20:00   ` patchwork-bot+netdevbpf
2021-07-27 20:00   ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YQFVYN1yv8oJotEl@carbon \
    --to=petkan@nucleusys.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.