summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/sio.c
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2000-11-05 14:31:19 +0000
committernyan <nyan@FreeBSD.org>2000-11-05 14:31:19 +0000
commitc62b300d458a141bac5c88c6865ccb36d5a67486 (patch)
treeee23e4096e2c2072e3251d9f664279096b6e8b9d /sys/pc98/cbus/sio.c
parent48503b7c5c0457713d7787367598c6e68425e6f7 (diff)
downloadFreeBSD-src-c62b300d458a141bac5c88c6865ccb36d5a67486.zip
FreeBSD-src-c62b300d458a141bac5c88c6865ccb36d5a67486.tar.gz
Merged from the following changes.
sys/conf/Makefile.i386 1.211 sys/conf/files.i386 1.329 sys/isa/fd.c 1.186, 1.188 and 1.189 sys/isa/sio.c 1.305 and 1.317 sys/i386/conf/GENERIC 1.270, 1.281, 1.282 and 1.284 sys/i386/i386/machdep.c 1.419 sys/i386/i386/userconfig.c 1.184
Diffstat (limited to 'sys/pc98/cbus/sio.c')
-rw-r--r--sys/pc98/cbus/sio.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index fa0320a..66a73e8 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -391,6 +391,7 @@ struct com_s {
struct resource *irqres;
struct resource *ioportres;
void *cookie;
+ dev_t devs[6];
/*
* Data area for output buffers. Someday we should build the output
@@ -962,6 +963,7 @@ sio_pccard_detach(dev)
device_t dev;
{
struct com_s *com;
+ int i;
com = (struct com_s *) device_get_softc(dev);
if (com == NULL) {
@@ -969,6 +971,8 @@ sio_pccard_detach(dev)
return (0);
}
com->gone = 1;
+ for (i = 0 ; i < 6; i++)
+ destroy_dev(com->devs[i]);
if (com->irqres) {
bus_teardown_intr(dev, com->irqres, com->cookie);
bus_release_resource(dev, SYS_RES_IRQ, 0, com->irqres);
@@ -2090,17 +2094,19 @@ determined_type: ;
sio_slow_ih = sinthand_add("tty:sio", &clk_ithd, siopoll,
NULL, SWI_TTY, 0);
}
- make_dev(&sio_cdevsw, unit,
+ com->devs[0] = make_dev(&sio_cdevsw, unit,
UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit);
- make_dev(&sio_cdevsw, unit | CONTROL_INIT_STATE,
+ com->devs[1] = make_dev(&sio_cdevsw, unit | CONTROL_INIT_STATE,
UID_ROOT, GID_WHEEL, 0600, "ttyid%r", unit);
- make_dev(&sio_cdevsw, unit | CONTROL_LOCK_STATE,
+ com->devs[2] = make_dev(&sio_cdevsw, unit | CONTROL_LOCK_STATE,
UID_ROOT, GID_WHEEL, 0600, "ttyld%r", unit);
- make_dev(&sio_cdevsw, unit | CALLOUT_MASK,
+ com->devs[3] = make_dev(&sio_cdevsw, unit | CALLOUT_MASK,
UID_UUCP, GID_DIALER, 0660, "cuaa%r", unit);
- make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_INIT_STATE,
+ com->devs[4] = make_dev(&sio_cdevsw,
+ unit | CALLOUT_MASK | CONTROL_INIT_STATE,
UID_UUCP, GID_DIALER, 0660, "cuaia%r", unit);
- make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_LOCK_STATE,
+ com->devs[5] = make_dev(&sio_cdevsw,
+ unit | CALLOUT_MASK | CONTROL_LOCK_STATE,
UID_UUCP, GID_DIALER, 0660, "cuala%r", unit);
com->flags = flags;
com->pps.ppscap = PPS_CAPTUREASSERT | PPS_CAPTURECLEAR;
@@ -2928,7 +2934,6 @@ more_intr:
if (com->do_timestamp)
microtime(&com->timestamp);
++com_events;
-/* XXX - needs to go away when alpha gets ithreads */
sched_swi(sio_slow_ih, SWI_DELAY);
#if 0 /* for testing input latency vs efficiency */
if (com->iptr - com->ibuf == 8)
OpenPOWER on IntegriCloud