]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
atm: remove dead SONET PHY ioctls
authorJakub Kicinski <kuba@kernel.org>
Mon, 15 Jun 2026 19:44:10 +0000 (12:44 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Jun 2026 15:53:52 +0000 (08:53 -0700)
The SONET_* ioctls are SONET/SDH PHY controls that atm_dev_ioctl() and
the compat path only ever forwarded to the driver's ->ioctl() handler.
The PHY drivers that implemented them (the S/UNI library and the framers
on the removed PCI/SBUS adapters) are gone, and neither surviving driver
services them: solos-pci has no ->ioctl, and usbatm handles only
ATM_QUERYLOOP. They now uniformly return an error regardless.

Drop the SONET compat passthrough and the SONET cases in atm_dev_ioctl(),
along with the now-unused linux/sonet.h includes. The SONET_* uAPI
definitions are untouched.

Link: https://patch.msgid.link/20260615194416.752559-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/atm/ioctl.c
net/atm/resources.c

index 0f3f9ad8301fd9edb4c244b612a38f27a000b809..4f2d185bf2f08695e3f95b8c3822be11dbd2081e 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/atmdev.h>
 #include <linux/atmarp.h>      /* manifest constants */
 #include <linux/capability.h>
-#include <linux/sonet.h>       /* for ioctls */
 #include <linux/atmsvc.h>
 #include <linux/mutex.h>
 #include <asm/ioctls.h>
@@ -290,18 +289,6 @@ static int do_atm_ioctl(struct socket *sock, unsigned int cmd32,
        int i;
        unsigned int cmd = 0;
 
-       switch (cmd32) {
-       case SONET_GETSTAT:
-       case SONET_GETSTATZ:
-       case SONET_GETDIAG:
-       case SONET_SETDIAG:
-       case SONET_CLRDIAG:
-       case SONET_SETFRAMING:
-       case SONET_GETFRAMING:
-       case SONET_GETFRSENSE:
-               return do_atmif_sioc(sock, cmd32, arg);
-       }
-
        for (i = 0; i < NR_ATM_IOCTL; i++) {
                if (cmd32 == atm_ioctl_map[i].cmd32) {
                        cmd = atm_ioctl_map[i].cmd;
index 939452a610c0ddff3da1b3456729f4ac4f31cc1d..7aac25e917b4b9605c78b9742d757d3ca2d53eb6 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/ctype.h>
 #include <linux/string.h>
 #include <linux/atmdev.h>
-#include <linux/sonet.h>
 #include <linux/kernel.h> /* for barrier */
 #include <linux/module.h>
 #include <linux/bitops.h>
@@ -361,10 +360,6 @@ int atm_dev_ioctl(unsigned int cmd, void __user *buf, int __user *sioc_len,
                }
                fallthrough;
        case ATM_SETCIRANGE:
-       case SONET_GETSTATZ:
-       case SONET_SETDIAG:
-       case SONET_CLRDIAG:
-       case SONET_SETFRAMING:
                if (!capable(CAP_NET_ADMIN)) {
                        error = -EPERM;
                        goto done;