Remove vestiges of digi(4) driver, first attempted in r305235 with

more in r317426. There's nothing in the tree that references digiio.h
(apart from digictl(8)), so no driver implements it. Since digictl(8)
was only used to control digi(4) devices, it too should go.
This commit is contained in:
Warner Losh 2018-01-10 14:58:58 +00:00
parent 8038068a2a
commit bdd31a5287
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327766
7 changed files with 4 additions and 383 deletions

View file

@ -38,6 +38,10 @@
# xargs -n1 | sort | uniq -d;
# done
# 20180109: Remove vestiges of digi(4) driver
OLD_FILES+=usr/include/sys/digiio.h
OLD_FILES+=usr/sbin/digictl
OLD_FILES+=usr/share/man/man8/digictl.8.gz
# 20180107: Convert remaining geli(8) tests to ATF
OLD_FILES+=tests/sys/geom/class/eli/nokey_test.sh
OLD_FILES+=tests/sys/geom/class/eli/readonly_test.sh

View file

@ -1,68 +0,0 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2001 Brian Somers <brian@Awfulhak.org>
* based on work by Slawa Olhovchenkov
* John Prince <johnp@knight-trosoft.com>
* Eric Hernes
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
/*
* A very small subset of cards.
*/
enum digi_model {
PCXE,
PCXEVE,
PCXI,
PCXEM,
PCCX,
PCIEPCX,
PCIXR
};
enum {
DIGIDB_INIT = (1<<0),
DIGIDB_OPEN = (1<<1),
DIGIDB_CLOSE = (1<<2),
DIGIDB_SET = (1<<3),
DIGIDB_INT = (1<<4),
DIGIDB_READ = (1<<5),
DIGIDB_WRITE = (1<<6),
DIGIDB_RX = (1<<7),
DIGIDB_TX = (1<<8),
DIGIDB_IRQ = (1<<9),
DIGIDB_MODEM = (1<<10),
DIGIDB_RI = (1<<11),
};
#define DIGIIO_REINIT _IO('e', 'A')
#define DIGIIO_DEBUG _IOW('e', 'B', int)
#define DIGIIO_RING _IOWINT('e', 'C')
#define DIGIIO_MODEL _IOR('e', 'D', enum digi_model)
#define DIGIIO_IDENT _IOW('e', 'E', char *)
#define DIGIIO_SETALTPIN _IOW('e', 'F', int)
#define DIGIIO_GETALTPIN _IOR('e', 'G', int)

View file

@ -22,7 +22,6 @@ SUBDIR= adduser \
devctl \
devinfo \
devmatch \
digictl \
diskinfo \
dumpcis \
etcupdate \

View file

@ -1,6 +0,0 @@
# $FreeBSD$
PROG= digictl
MAN= digictl.8
.include <bsd.prog.mk>

View file

@ -1,17 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -1,118 +0,0 @@
.\" $FreeBSD$
.Dd June 20, 2001
.Dt DIGICTL 8
.Os
.Sh NAME
.Nm digictl
.Nd control
.Tn Digiboard
devices
.Sh SYNOPSIS
.Nm
.Fl a
.Cm disable | enable | query
.Ar device ...
.Nm
.Op Fl d Ar debug
.Op Fl ir
.Ar ctrl-device ...
.Sh DESCRIPTION
The
.Nm
utility provides control of the
.Tn Digiboard
installed with the given
.Ar ctrl-device
name and provides control of individual digiboard
.Ar devices .
A digiboard
.Ar ctrl-device
is usually of the form
.Sm off
.Pa /dev/digi Ar N Pa .ctl
.Sm on
where
.Ar N
is the card number and starts at
.Dq 0
for the first attached card.
A digiboard
.Ar device
is usually of the form
.Sm off
.Pa /dev/cua Oo Pa il Oc Pa D Ar N Pa \&. Ar P
.Sm on
or
.Sm off
.Pa /dev/tty Oo Pa il Oc Pa D Ar N Pa \&. Ar P
.Sm on
where
.Ar N
is the card number and
.Ar P
is the port number.
.Pp
The following flags are recognized:
.Bl -tag -width 10n
.It Fl a Cm disable | enable | query
Disable, enable or query the
.Em ALTPIN
settings for the given port(s).
.Pp
When ALTPIN is enabled, the CD and DSR lines are logically reversed.
This is useful when wiring serial ports to an 8 way RJ45 cable (full
10 way RJ45 cables are quite rare).
.Pp
A single ALTPIN setting applies to both of the callout and callin devices.
.It Fl d Ar debug
If the driver has been compiled with
.Dv DEBUG
defined, the following bits from the
.Ar debug
variable are used to enable diagnostics in the digiboard driver:
.Bl -tag -width ".No 1024 ( Em MODEM )"
.It 1 ( Em INIT )
Diagnostics during card attach, detach and initialization.
.It 2 ( Em OPEN )
Diagnostics when opening a port.
.It 4 ( Em CLOSE )
Diagnostics when closing a port.
.It 8 ( Em SET )
Diagnostics when setting tty device flags.
.It 16 ( Em INT )
Diagnostics when processing card events.
.It 32 ( Em READ )
Reports return values from port reads.
.It 64 ( Em WRITE )
Reports return values from port writes.
.It 128 ( Em RX )
Reports receive queue flow control.
.It 256 ( Em TX )
Reports transmit queue flow control.
.It 512 ( Em IRQ )
Diagnostics during interrupts (enable these with care).
.It 1024 ( Em MODEM )
Diagnostics when setting modem status flags.
.It 2048 ( Em RI )
Reports when a RING is received.
.El
.It Fl i
Display the card identification string and type ID.
.It Fl r
Reinitialize the card.
For boards with external port modules, it is possible to add or remove
modules and dynamically reprobe the number of ports using this switch.
All ports on the card must be closed in order to reinitialize the card.
.Pp
It is preferable to reinitialize the card rather than reload the entire
digi module as reinitialization only affects the specified board rather
than affecting all attached boards.
.El
.Sh HISTORY
The
.Nm
utility first appeared in
.Fx 5.0 .
.Sh BUGS
It should be possible to reinitialize a board without closing all of the
existing ports.

View file

@ -1,173 +0,0 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2001 Brian Somers <brian@Awfulhak.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
#include <sys/digiio.h>
#include <sys/ioctl.h>
#include <unistd.h>
enum aflag { NO_AFLAG, ALTPIN_DISABLE, ALTPIN_ENABLE, ALTPIN_QUERY };
static int
usage(const char *prog)
{
fprintf(stderr, "usage: %s -a disable|enable|query device\n", prog);
fprintf(stderr, " %s [-d debug] [-ir] ctrl-device...\n", prog);
return (EX_USAGE);
}
int
main(int argc, char **argv)
{
char namedata[256], *name = namedata;
const char *prog;
enum digi_model model;
int altpin, ch, debug, fd, i, res;
int dflag, iflag, rflag;
enum aflag aflag;
if ((prog = strrchr(argv[0], '/')) == NULL)
prog = argv[0];
else
prog++;
aflag = NO_AFLAG;
dflag = iflag = rflag = 0;
while ((ch = getopt(argc, argv, "a:d:ir")) != -1)
switch (ch) {
case 'a':
if (strcasecmp(optarg, "disable") == 0)
aflag = ALTPIN_DISABLE;
else if (strcasecmp(optarg, "enable") == 0)
aflag = ALTPIN_ENABLE;
else if (strcasecmp(optarg, "query") == 0)
aflag = ALTPIN_QUERY;
else
return (usage(prog));
break;
case 'd':
dflag = 1;
debug = atoi(optarg);
break;
case 'i':
iflag = 1;
break;
case 'r':
rflag = 1;
break;
default:
return (usage(prog));
}
if ((dflag || iflag || rflag) && aflag != NO_AFLAG)
return (usage(prog));
if (argc <= optind)
return (usage(prog));
altpin = (aflag == ALTPIN_ENABLE);
res = 0;
for (i = optind; i < argc; i++) {
if ((fd = open(argv[i], O_RDONLY)) == -1) {
fprintf(stderr, "%s: %s: open: %s\n", prog, argv[i],
strerror(errno));
res++;
continue;
}
switch (aflag) {
case NO_AFLAG:
break;
case ALTPIN_ENABLE:
case ALTPIN_DISABLE:
if (ioctl(fd, DIGIIO_SETALTPIN, &altpin) != 0) {
fprintf(stderr, "%s: %s: set altpin: %s\n",
prog, argv[i], strerror(errno));
res++;
}
break;
case ALTPIN_QUERY:
if (ioctl(fd, DIGIIO_GETALTPIN, &altpin) != 0) {
fprintf(stderr, "%s: %s: get altpin: %s\n",
prog, argv[i], strerror(errno));
res++;
} else {
if (argc > optind + 1)
printf("%s: ", argv[i]);
puts(altpin ? "enabled" : "disabled");
}
break;
}
if (dflag && ioctl(fd, DIGIIO_DEBUG, &debug) != 0) {
fprintf(stderr, "%s: %s: debug: %s\n",
prog, argv[i], strerror(errno));
res++;
}
if (iflag) {
if (ioctl(fd, DIGIIO_MODEL, &model) != 0) {
fprintf(stderr, "%s: %s: model: %s\n",
prog, argv[i], strerror(errno));
res++;
} else if (ioctl(fd, DIGIIO_IDENT, &name) != 0) {
fprintf(stderr, "%s: %s: ident: %s\n",
prog, argv[i], strerror(errno));
res++;
} else {
if (argc > optind + 1)
printf("%s: ", argv[i]);
printf("%s (type %d)\n", name, (int)model);
}
}
if (rflag && ioctl(fd, DIGIIO_REINIT) != 0) {
fprintf(stderr, "%s: %s: reinit: %s\n",
prog, argv[i], strerror(errno));
res++;
}
close(fd);
}
return (res);
}