]> err.no Git - linux-2.6/commitdiff
cxgb3 - private ioctl cleanup
authorDivy Le Ray <divy@chelsio.com>
Sun, 25 Feb 2007 00:43:56 +0000 (16:43 -0800)
committerJeff Garzik <jeff@garzik.org>
Tue, 27 Feb 2007 09:27:12 +0000 (04:27 -0500)
Clean up some private ioctls.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/cxgb3/cxgb3_ioctl.h
drivers/net/cxgb3/cxgb3_main.c

index a94281861a663dcb12f06f372b54c725aff99e16..0a82fcddf2d8a9d49b014b21a3662349464fa484 100644 (file)
  * Ioctl commands specific to this driver.
  */
 enum {
-       CHELSIO_SETREG = 1024,
-       CHELSIO_GETREG,
-       CHELSIO_SETTPI,
-       CHELSIO_GETTPI,
-       CHELSIO_GETMTUTAB,
-       CHELSIO_SETMTUTAB,
-       CHELSIO_GETMTU,
-       CHELSIO_SET_PM,
-       CHELSIO_GET_PM,
-       CHELSIO_GET_TCAM,
-       CHELSIO_SET_TCAM,
-       CHELSIO_GET_TCB,
-       CHELSIO_GET_MEM,
-       CHELSIO_LOAD_FW,
-       CHELSIO_GET_PROTO,
-       CHELSIO_SET_PROTO,
-       CHELSIO_SET_TRACE_FILTER,
-       CHELSIO_SET_QSET_PARAMS,
-       CHELSIO_GET_QSET_PARAMS,
-       CHELSIO_SET_QSET_NUM,
-       CHELSIO_GET_QSET_NUM,
-       CHELSIO_SET_PKTSCHED,
+       CHELSIO_GETMTUTAB               = 1029,
+       CHELSIO_SETMTUTAB               = 1030,
+       CHELSIO_SET_PM                  = 1032,
+       CHELSIO_GET_PM                  = 1033,
+       CHELSIO_GET_MEM                 = 1038,
+       CHELSIO_LOAD_FW                 = 1041,
+       CHELSIO_SET_TRACE_FILTER        = 1044,
+       CHELSIO_SET_QSET_PARAMS         = 1045,
+       CHELSIO_GET_QSET_PARAMS         = 1046,
+       CHELSIO_SET_QSET_NUM            = 1047,
+       CHELSIO_GET_QSET_NUM            = 1048,
 };
 
 struct ch_reg {
index 59f2b518c926be501e826b11360affc5112ed81f..7ff834e45d6bf9d035288c88829831b899591019 100644 (file)
@@ -1552,32 +1552,6 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
                return -EFAULT;
 
        switch (cmd) {
-       case CHELSIO_SETREG:{
-               struct ch_reg edata;
-
-               if (!capable(CAP_NET_ADMIN))
-                       return -EPERM;
-               if (copy_from_user(&edata, useraddr, sizeof(edata)))
-                       return -EFAULT;
-               if ((edata.addr & 3) != 0
-                       || edata.addr >= adapter->mmio_len)
-                       return -EINVAL;
-               writel(edata.val, adapter->regs + edata.addr);
-               break;
-       }
-       case CHELSIO_GETREG:{
-               struct ch_reg edata;
-
-               if (copy_from_user(&edata, useraddr, sizeof(edata)))
-                       return -EFAULT;
-               if ((edata.addr & 3) != 0
-                       || edata.addr >= adapter->mmio_len)
-                       return -EINVAL;
-               edata.val = readl(adapter->regs + edata.addr);
-               if (copy_to_user(useraddr, &edata, sizeof(edata)))
-                       return -EFAULT;
-               break;
-       }
        case CHELSIO_SET_QSET_PARAMS:{
                int i;
                struct qset_params *q;
@@ -1841,10 +1815,10 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
                        return -EINVAL;
 
                /*
-                       * Version scheme:
-                       * bits 0..9: chip version
-                       * bits 10..15: chip revision
-                       */
+                * Version scheme:
+                * bits 0..9: chip version
+                * bits 10..15: chip revision
+                */
                t.version = 3 | (adapter->params.rev << 10);
                if (copy_to_user(useraddr, &t, sizeof(t)))
                        return -EFAULT;
@@ -1893,20 +1867,6 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
                                                t.trace_rx);
                break;
        }
-       case CHELSIO_SET_PKTSCHED:{
-               struct ch_pktsched_params p;
-
-               if (!capable(CAP_NET_ADMIN))
-                               return -EPERM;
-               if (!adapter->open_device_map)
-                               return -EAGAIN; /* uP and SGE must be running */
-               if (copy_from_user(&p, useraddr, sizeof(p)))
-                               return -EFAULT;
-               send_pktsched_cmd(adapter, p.sched, p.idx, p.min, p.max,
-                                 p.binding);
-               break;
-                       
-       }
        default:
                return -EOPNOTSUPP;
        }