Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jun 2018 10:23:32 +0000 (UTC)
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334923 - in head: share/man/man4 share/man/man4/man4.i386 sys/dev/atkbdc sys/dev/mse sys/dev/syscons sys/sys
Message-ID:  <201806101023.w5AANWIw027931@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wulf
Date: Sun Jun 10 10:23:31 2018
New Revision: 334923
URL: https://svnweb.freebsd.org/changeset/base/334923

Log:
  Drop MOUSE_GETVARS and MOUSE_SETVARS ioctls support.
  
  These ioctls are not documented and only stubbed in a few drivers: mse(4),
  psm(4) and syscon's sysmouse(4). The only exception is MOUSE_GETVARS
  implemented in psm(4)
  
  Given the fact that they were introduced 20 years ago and implementation
  has never been completed, remove any related code.
  
  PR:		228718 (exp-run)
  Reviewed by:	imp
  Differential Revision:	https://reviews.freebsd.org/D15726

Modified:
  head/share/man/man4/man4.i386/mse.4
  head/share/man/man4/mouse.4
  head/share/man/man4/psm.4
  head/share/man/man4/sysmouse.4
  head/sys/dev/atkbdc/psm.c
  head/sys/dev/mse/mse.c
  head/sys/dev/syscons/sysmouse.c
  head/sys/sys/mouse.h

Modified: head/share/man/man4/man4.i386/mse.4
==============================================================================
--- head/share/man/man4/man4.i386/mse.4	Sun Jun 10 09:15:13 2018	(r334922)
+++ head/share/man/man4/man4.i386/mse.4	Sun Jun 10 10:23:31 2018	(r334923)
@@ -319,12 +319,6 @@ and
 may be modifiable.
 Setting values in the other field does not generate
 error and has no effect.
-.\" .Pp
-.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars
-.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars
-.\" These commands are not supported by the
-.\" .Nm
-.\" driver.
 .Pp
 .It Dv MOUSE_READDATA Ar mousedata_t *data
 .It Dv MOUSE_READSTATE Ar mousedata_t *state

Modified: head/share/man/man4/mouse.4
==============================================================================
--- head/share/man/man4/mouse.4	Sun Jun 10 09:15:13 2018	(r334922)
+++ head/share/man/man4/mouse.4	Sun Jun 10 10:23:31 2018	(r334923)
@@ -292,27 +292,6 @@ You may also put zero in
 and
 .Dv rate ,
 and the default value for the fields will be selected.
-.\" .Pp
-.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars
-.\" Get internal variables of the mouse driver.
-.\" The variables which can be manipulated through these commands
-.\" are specific to each driver.
-.\" This command may not be supported by all drivers.
-.\" .Bd -literal
-.\" typedef struct mousevar {
-.\"     int var[16];    /* internal variables */
-.\" } mousevar_t;
-.\" .Ed
-.\" .Pp
-.\" If the commands are supported, the first element of the array is
-.\" filled with a signature value.
-.\" Apart from the signature data, there is currently no standard concerning
-.\" the other elements of the buffer.
-.\" .Pp
-.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars
-.\" Get internal variables of the mouse driver.
-.\" The first element of the array must be a signature value.
-.\" This command may not be supported by all drivers.
 .Pp
 .It Dv MOUSE_READDATA Ar mousedata_t *data
 The command reads the raw data from the device.

Modified: head/share/man/man4/psm.4
==============================================================================
--- head/share/man/man4/psm.4	Sun Jun 10 09:15:13 2018	(r334922)
+++ head/share/man/man4/psm.4	Sun Jun 10 10:23:31 2018	(r334923)
@@ -591,12 +591,6 @@ You may also put zero in
 and
 .Dv rate ,
 and the default value for the fields will be selected.
-.\" .Pp
-.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars
-.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars
-.\" These commands are not supported by the
-.\" .Nm
-.\" driver.
 .Pp
 .It Dv MOUSE_READDATA Ar mousedata_t *data
 .\" The command reads the raw data from the device.

Modified: head/share/man/man4/sysmouse.4
==============================================================================
--- head/share/man/man4/sysmouse.4	Sun Jun 10 09:15:13 2018	(r334922)
+++ head/share/man/man4/sysmouse.4	Sun Jun 10 10:23:31 2018	(r334923)
@@ -264,12 +264,6 @@ Only
 may be modifiable.
 Setting values in the other field does not generate
 error and has no effect.
-.\" .Pp
-.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars
-.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars
-.\" These commands are not supported by the
-.\" .Nm
-.\" driver.
 .Pp
 .It Dv MOUSE_READDATA Ar mousedata_t *data
 .It Dv MOUSE_READSTATE Ar mousedata_t *state

Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c	Sun Jun 10 09:15:13 2018	(r334922)
+++ head/sys/dev/atkbdc/psm.c	Sun Jun 10 10:23:31 2018	(r334923)
@@ -2560,9 +2560,6 @@ psmioctl(struct cdev *dev, u_long cmd, caddr_t addr, i
 	struct psm_softc *sc = dev->si_drv1;
 	mousemode_t mode;
 	mousestatus_t status;
-#if (defined(MOUSE_GETVARS))
-	mousevar_t *var;
-#endif
 	mousedata_t *data;
 	int stat[3];
 	int command_byte;
@@ -2758,21 +2755,6 @@ psmioctl(struct cdev *dev, u_long cmd, caddr_t addr, i
 		splx(s);
 		*(mousestatus_t *)addr = status;
 		break;
-
-#if (defined(MOUSE_GETVARS))
-	case MOUSE_GETVARS:
-		var = (mousevar_t *)addr;
-		bzero(var, sizeof(*var));
-		s = spltty();
-		var->var[0] = MOUSE_VARS_PS2_SIG;
-		var->var[1] = sc->config;
-		var->var[2] = sc->flags;
-		splx(s);
-		break;
-
-	case MOUSE_SETVARS:
-		return (ENODEV);
-#endif /* MOUSE_GETVARS */
 
 	case MOUSE_READSTATE:
 	case MOUSE_READDATA:

Modified: head/sys/dev/mse/mse.c
==============================================================================
--- head/sys/dev/mse/mse.c	Sun Jun 10 09:15:13 2018	(r334922)
+++ head/sys/dev/mse/mse.c	Sun Jun 10 10:23:31 2018	(r334923)
@@ -434,12 +434,6 @@ mseioctl(struct cdev *dev, u_long cmd, caddr_t addr, i
 	case MOUSE_READDATA:
 		return (ENODEV);
 
-#if (defined(MOUSE_GETVARS))
-	case MOUSE_GETVARS:
-	case MOUSE_SETVARS:
-		return (ENODEV);
-#endif
-
 	default:
 		return (ENOTTY);
 	}

Modified: head/sys/dev/syscons/sysmouse.c
==============================================================================
--- head/sys/dev/syscons/sysmouse.c	Sun Jun 10 09:15:13 2018	(r334922)
+++ head/sys/dev/syscons/sysmouse.c	Sun Jun 10 10:23:31 2018	(r334923)
@@ -202,12 +202,6 @@ smdev_ioctl(struct tty *tp, u_long cmd, caddr_t data, 
 		mouse_status.dz = 0;
 		return 0;
 
-#ifdef notyet
-	case MOUSE_GETVARS:	/* get internal mouse variables */
-	case MOUSE_SETVARS:	/* set internal mouse variables */
-		return ENODEV;
-#endif
-
 	case MOUSE_READSTATE:	/* read status from the device */
 	case MOUSE_READDATA:	/* read data from the device */
 		return ENODEV;

Modified: head/sys/sys/mouse.h
==============================================================================
--- head/sys/sys/mouse.h	Sun Jun 10 09:15:13 2018	(r334922)
+++ head/sys/sys/mouse.h	Sun Jun 10 10:23:31 2018	(r334923)
@@ -38,8 +38,6 @@
 #define MOUSE_SETMODE		_IOW('M', 3, mousemode_t)
 #define MOUSE_GETLEVEL		_IOR('M', 4, int)
 #define MOUSE_SETLEVEL		_IOW('M', 5, int)
-#define MOUSE_GETVARS		_IOR('M', 6, mousevar_t)
-#define MOUSE_SETVARS		_IOW('M', 7, mousevar_t)
 #define MOUSE_READSTATE		_IOWR('M', 8, mousedata_t)
 #define MOUSE_READDATA		_IOWR('M', 9, mousedata_t)
 
@@ -227,19 +225,6 @@ typedef struct mousedata {
 	int len;		/* # of data in the buffer */
 	int buf[16];		/* data buffer */
 } mousedata_t;
-
-#if (defined(MOUSE_GETVARS))
-
-typedef struct mousevar {
-	int var[16];
-} mousevar_t;
-
-/* magic numbers in var[0] */
-#define MOUSE_VARS_PS2_SIG	0x00325350	/* 'PS2' */
-#define MOUSE_VARS_BUS_SIG	0x00535542	/* 'BUS' */
-#define MOUSE_VARS_INPORT_SIG	0x00504e49	/* 'INP' */
-
-#endif /* MOUSE_GETVARS */
 
 /* Synaptics Touchpad */
 #define MOUSE_SYNAPTICS_PACKETSIZE	6	/* '3' works better */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806101023.w5AANWIw027931>