Remove the TIOCDCDTIMESTAMP option.

The RFC-2783 PPS-API (<sys/timepps.h>) provides better and more
configurable service.
This commit is contained in:
Poul-Henning Kamp 2004-06-22 20:32:17 +00:00
parent 3db5687d2e
commit fdf5c3da04
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130938
6 changed files with 1 additions and 62 deletions

View File

@ -299,9 +299,7 @@ struct com_s {
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 @@ cont:
++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
@ -1673,10 +1666,6 @@ sioioctl(dev, cmd, data, flag, td)
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);

View File

@ -107,10 +107,6 @@ struct digi_p {
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;

View File

@ -251,9 +251,7 @@ struct com_s {
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
@ -1449,7 +1447,6 @@ comhardclose(com)
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;
@ -1914,11 +1911,6 @@ cont:
/* 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
@ -2160,10 +2152,6 @@ sioioctl(dev, cmd, data, flag, td)
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);

View File

@ -331,9 +331,7 @@ struct com_s {
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
@ -2169,7 +2167,6 @@ comhardclose(com)
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))
@ -2807,11 +2804,6 @@ cont:
#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
@ -3135,10 +3127,6 @@ sioioctl(dev, cmd, data, flag, td)
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);
@ -3193,10 +3181,6 @@ sioioctl(dev, cmd, data, flag, td)
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);

View File

@ -331,9 +331,7 @@ struct com_s {
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
@ -2169,7 +2167,6 @@ comhardclose(com)
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))
@ -2807,11 +2804,6 @@ cont:
#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
@ -3135,10 +3127,6 @@ sioioctl(dev, cmd, data, flag, td)
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);
@ -3193,10 +3181,6 @@ sioioctl(dev, cmd, data, flag, td)
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);

View File

@ -131,9 +131,7 @@ struct winsize {
/* 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 */