[HEADSUP] retire TIOCDCDTIMESTAMP

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Mon, 21 Jun 2004 21:32:35 +0200
This patch retires the TIOCDCDTIMESTAMP ioctl.

The RFC 2783 PPS-API has been standardized to do everything
TIOCDCDTIMESTAMP did and quite a bit more.

(see src/tools/test/ppsapi for how to use the PPS-API).

Poul-Henning




Index: dev/cy/cy.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/cy/cy.c,v
retrieving revision 1.153
diff -u -r1.153 cy.c
--- dev/cy/cy.c	17 Jun 2004 17:16:43 -0000	1.153
+++ dev/cy/cy.c	21 Jun 2004 19:24:00 -0000
_at__at_ -299,9 +299,7 _at__at_
 	struct termios	lt_out;
 
 	bool_t	do_timestamp;
-	bool_t	do_dcd_timestamp;
 	struct timeval	timestamp;
-	struct timeval	dcd_timestamp;
 
 	u_long	bytes_in;	/* statistics */
 	u_long	bytes_out;
_at__at_ -1283,11 +1281,6 _at__at_
 			++com->mdm;
 			modem_status = cd_inb(iobase, CD1400_MSVR2, cy_align);
 		if (modem_status != com->last_modem_status) {
-			if (com->do_dcd_timestamp
-			    && !(com->last_modem_status & MSR_DCD)
-			    && modem_status & MSR_DCD)
-				microtime(&com->dcd_timestamp);
-
 			/*
 			 * Schedule high level to handle DCD changes.  Note
 			 * that we don't use the delta bits anywhere.  Some
_at__at_ -1669,10 +1662,6 _at__at_
 		com->do_timestamp = TRUE;
 		*(struct timeval *)data = com->timestamp;
 		break;
-	case TIOCDCDTIMESTAMP:
-		com->do_dcd_timestamp = TRUE;
-		*(struct timeval *)data = com->dcd_timestamp;
-		break;
 	default:
 		splx(s);
 		return (ENOTTY);
Index: dev/digi/digi.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/digi/digi.h,v
retrieving revision 1.15
diff -u -r1.15 digi.h
--- dev/digi/digi.h	16 Jun 2004 09:46:42 -0000	1.15
+++ dev/digi/digi.h	21 Jun 2004 19:24:06 -0000
_at__at_ -107,10 +107,6 _at__at_
 	struct termios lt_in;		/* should be in struct tty */
 	struct termios lt_out;
 
-	u_int do_timestamp;
-	u_int do_dcd_timestamp;
-	struct timeval dcd_timestamp;
-
 	u_long bytes_in, bytes_out;
 	u_int delta_error_counts[CE_NTYPES];
 	u_long error_counts;
Index: dev/sio/sio.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sio/sio.c,v
retrieving revision 1.438
diff -u -r1.438 sio.c
--- dev/sio/sio.c	16 Jun 2004 09:46:56 -0000	1.438
+++ dev/sio/sio.c	21 Jun 2004 19:24:17 -0000
_at__at_ -251,9 +251,7 _at__at_
 	struct termios	lt_out;
 
 	bool_t	do_timestamp;
-	bool_t	do_dcd_timestamp;
 	struct timeval	timestamp;
-	struct timeval	dcd_timestamp;
 	struct	pps_state pps;
 	int	pps_bit;
 #ifdef ALT_BREAK_TO_DEBUGGER
_at__at_ -1409,7 +1407,6 _at__at_
 	com->poll = FALSE;
 	com->poll_output = FALSE;
 	com->do_timestamp = FALSE;
-	com->do_dcd_timestamp = FALSE;
 	com->pps.ppsparam.mode = 0;
 	sio_setreg(com, com_cfcr, com->cfcr_image &= ~CFCR_SBREAK);
 	tp = com->tp;
_at__at_ -1870,11 +1867,6 _at__at_
 		/* modem status change? (always check before doing output) */
 		modem_status = inb(com->modem_status_port);
 		if (modem_status != com->last_modem_status) {
-			if (com->do_dcd_timestamp
-			    && !(com->last_modem_status & MSR_DCD)
-			    && modem_status & MSR_DCD)
-				microtime(&com->dcd_timestamp);
-
 			/*
 			 * Schedule high level to handle DCD changes.  Note
 			 * that we don't use the delta bits anywhere.  Some
_at__at_ -2096,10 +2088,6 _at__at_
 		com->do_timestamp = TRUE;
 		*(struct timeval *)data = com->timestamp;
 		break;
-	case TIOCDCDTIMESTAMP:
-		com->do_dcd_timestamp = TRUE;
-		*(struct timeval *)data = com->dcd_timestamp;
-		break;
 	default:
 		splx(s);
 		error = pps_ioctl(cmd, data, &com->pps);
Index: pc98/pc98/sio.c
===================================================================
RCS file: /home/ncvs/src/sys/pc98/pc98/sio.c,v
retrieving revision 1.216
diff -u -r1.216 sio.c
--- pc98/pc98/sio.c	16 Jun 2004 09:47:19 -0000	1.216
+++ pc98/pc98/sio.c	21 Jun 2004 19:24:29 -0000
_at__at_ -331,9 +331,7 _at__at_
 	struct termios	lt_out;
 
 	bool_t	do_timestamp;
-	bool_t	do_dcd_timestamp;
 	struct timeval	timestamp;
-	struct timeval	dcd_timestamp;
 	struct	pps_state pps;
 	int	pps_bit;
 #ifdef ALT_BREAK_TO_DEBUGGER
_at__at_ -2129,7 +2127,6 _at__at_
 	com->poll = FALSE;
 	com->poll_output = FALSE;
 	com->do_timestamp = FALSE;
-	com->do_dcd_timestamp = FALSE;
 	com->pps.ppsparam.mode = 0;
 #ifdef PC98
 	if (IS_8251(com->pc98_if_type))
_at__at_ -2763,11 +2760,6 _at__at_
 #endif
 		modem_status = inb(com->modem_status_port);
 		if (modem_status != com->last_modem_status) {
-			if (com->do_dcd_timestamp
-			    && !(com->last_modem_status & MSR_DCD)
-			    && modem_status & MSR_DCD)
-				microtime(&com->dcd_timestamp);
-
 			/*
 			 * Schedule high level to handle DCD changes.  Note
 			 * that we don't use the delta bits anywhere.  Some
_at__at_ -3071,10 +3063,6 _at__at_
 		com->do_timestamp = TRUE;
 		*(struct timeval *)data = com->timestamp;
 		break;
-	    case TIOCDCDTIMESTAMP:
-		com->do_dcd_timestamp = TRUE;
-		*(struct timeval *)data = com->dcd_timestamp;
-		break;
 	    default:
 		splx(s);
 		error = pps_ioctl(cmd, data, &com->pps);
_at__at_ -3129,10 +3117,6 _at__at_
 		com->do_timestamp = TRUE;
 		*(struct timeval *)data = com->timestamp;
 		break;
-	case TIOCDCDTIMESTAMP:
-		com->do_dcd_timestamp = TRUE;
-		*(struct timeval *)data = com->dcd_timestamp;
-		break;
 	default:
 		splx(s);
 		error = pps_ioctl(cmd, data, &com->pps);
Index: sys/ttycom.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/ttycom.h,v
retrieving revision 1.20
diff -u -r1.20 ttycom.h
--- sys/ttycom.h	10 May 2004 02:24:56 -0000	1.20
+++ sys/ttycom.h	21 Jun 2004 19:25:35 -0000
_at__at_ -131,9 +131,7 _at__at_
 						/* 90-70 ppp; many conflicts */
 #define	TIOCTIMESTAMP	_IOR('t', 89, struct timeval)	/* enable/get timestamp
 						 * of last input event */
-#define	TIOCDCDTIMESTAMP _IOR('t', 88, struct timeval)	/* enable/get timestamp
-						 * of last DCd rise */
-						/* 88 slip; conflicts */
+						/* 88 slip, ppp; conflicts */
 #define	TIOCSDRAINWAIT	_IOW('t', 87, int)	/* set ttywait timeout */
 #define	TIOCGDRAINWAIT	_IOR('t', 86, int)	/* get ttywait timeout */
 						/* 84-80 slip */
-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk_at_FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Received on Mon Jun 21 2004 - 17:32:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:58 UTC