Message ID | 20210727134517.1384504-15-arnd@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | ef1b5b0c30bc61587a9da19cc0ab078bba53ebcc |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | ndo_ioctl rework | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | fail | Series longer than 15 patches |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 5 of 5 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 1 this patch: 1 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 34 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 1 this patch: 1 |
netdev/header_inline | success | Link |
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 > >
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,