From owner-freebsd-current@FreeBSD.ORG Mon Jun 21 19:32:38 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3275416A4CE for ; Mon, 21 Jun 2004 19:32:38 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CDFD43D1F for ; Mon, 21 Jun 2004 19:32:37 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost.freebsd.dk [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i5LJWZ4P023207 for ; Mon, 21 Jun 2004 21:32:35 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: current@freebsd.org From: Poul-Henning Kamp Date: Mon, 21 Jun 2004 21:32:35 +0200 Message-ID: <23206.1087846355@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Subject: [HEADSUP] retire TIOCDCDTIMESTAMP X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 19:32:38 -0000 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 @@ -299,9 +299,7 @@ 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; @@ -1283,11 +1281,6 @@ ++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 @@ -1669,10 +1662,6 @@ 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 @@ -107,10 +107,6 @@ 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 @@ -251,9 +251,7 @@ 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 @@ -1409,7 +1407,6 @@ 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; @@ -1870,11 +1867,6 @@ /* 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 @@ -2096,10 +2088,6 @@ 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 @@ -331,9 +331,7 @@ 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 @@ -2129,7 +2127,6 @@ 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)) @@ -2763,11 +2760,6 @@ #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 @@ -3071,10 +3063,6 @@ 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); @@ -3129,10 +3117,6 @@ 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 @@ -131,9 +131,7 @@ /* 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@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.