diff options
author | wollman <wollman@FreeBSD.org> | 1995-04-12 20:48:13 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-04-12 20:48:13 +0000 |
commit | 6a8d3a357d2d39cf1274d89e9ee73459574e038d (patch) | |
tree | 3733f361a8298b0f38c2e4586c976a9240816ec2 /sys/dev | |
parent | 669ed5b46ea62e3997fc8495702ddc9078fa7031 (diff) | |
download | FreeBSD-src-6a8d3a357d2d39cf1274d89e9ee73459574e038d.zip FreeBSD-src-6a8d3a357d2d39cf1274d89e9ee73459574e038d.tar.gz |
Add a class field to devconf and mst drivers.
For those where it was easy, drivers were also fixed to call
dev_attach() during probe rather than attach (in keeping with the
new design articulated in a mail message five months ago). For
a few that were really easy, correct state tracking was added as well.
The `fd' driver was fixed to correctly fill in the description.
The CPU identify code was fixed to attach a `cpu' device. The code
was also massively reordered to fill in cpu_model with somethingremotely
resembling what identifycpu() prints out. A few bytes saved by using
%b to format the features list rather than lots of ifs.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ed/if_ed.c | 9 | ||||
-rw-r--r-- | sys/dev/ep/if_ep.c | 17 | ||||
-rw-r--r-- | sys/dev/fdc/fdc.c | 32 | ||||
-rw-r--r-- | sys/dev/ie/if_ie.c | 14 | ||||
-rw-r--r-- | sys/dev/lnc/if_lnc.c | 3 | ||||
-rw-r--r-- | sys/dev/mcd/mcd.c | 10 | ||||
-rw-r--r-- | sys/dev/mse/mse.c | 48 | ||||
-rw-r--r-- | sys/dev/scd/scd.c | 11 | ||||
-rw-r--r-- | sys/dev/sio/sio.c | 82 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.c | 5 |
10 files changed, 146 insertions, 85 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index e4e71e2..ce1ba4f 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -13,7 +13,7 @@ * the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000, * and a variety of similar clones. * - * $Id: if_ed.c,v 1.67 1995/02/26 20:03:53 davidg Exp $ + * $Id: if_ed.c,v 1.68 1995/03/16 18:12:01 bde Exp $ */ #include "ed.h" @@ -180,8 +180,9 @@ static struct kern_devconf kdc_ed_template = { isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, /* parent */ 0, /* parentdata */ - DC_UNCONFIGURED, - "" /* description */ + DC_UNCONFIGURED, /* state */ + "", /* description */ + DC_CLS_NETIF /* class */ }; static inline void @@ -211,7 +212,9 @@ ed_probe(isa_dev) { int nports; +#ifndef DEV_LKM ed_registerdev(isa_dev, "Ethernet adapter"); +#endif /* not DEV_LKM */ nports = ed_probe_WD80x3(isa_dev); if (nports) diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index 68db808..f4c6d95 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -38,7 +38,7 @@ */ /* - * $Id: if_ep.c,v 1.13 1995/04/10 07:54:34 root Exp root $ + * $Id: if_ep.c,v 1.25 1995/04/10 21:24:58 jkh Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -132,13 +132,14 @@ struct isa_driver epdriver = { }; static struct kern_devconf kdc_ep[NEP] = { { - 0, 0, 0, /* filled in by dev_attach */ + 0, 0, 0, /* filled in by dev_attach */ "ep", 0, { MDDT_ISA, 0, "net" }, isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, - &kdc_isa0, /* parent */ - 0, /* parentdata */ - DC_BUSY, /* network interfaces are always ``open'' */ - "3Com 3C509 Ethernet adapter" + &kdc_isa0, /* parent */ + 0, /* parentdata */ + DC_UNCONFIGURED, /* state */ + "3Com 3C509 Ethernet adapter", + DC_CLS_NETIF /* class */ } }; static inline void @@ -305,6 +306,8 @@ epprobe(is) u_short k; int i; + ep_registerdev(is); + if (!ep_look_for_board_at(is)) return (0); /* @@ -429,7 +432,7 @@ epattach(is) ifp->if_timer=1; if_attach(ifp); - ep_registerdev(is); + kdc_ep[is->id_unit].kdc_state = DC_BUSY; /* * Fill the hardware address into ifa_addr if we find an AF_LINK entry. diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 9a6816f..e755f56 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.55 1995/03/26 19:28:18 rgrimes Exp $ + * $Id: fd.c,v 1.56 1995/04/06 07:20:15 rgrimes Exp $ * */ @@ -101,7 +101,8 @@ static struct kern_devconf kdc_fd[NFD] = { { 0, /* parent */ 0, /* parentdata */ DC_UNCONFIGURED, /* state */ - "floppy disk" + "floppy disk", + DC_CLS_DISK /* class */ } }; struct kern_devconf kdc_fdc[NFDC] = { { @@ -111,7 +112,8 @@ struct kern_devconf kdc_fdc[NFDC] = { { 0, /* parent */ 0, /* parentdata */ DC_UNCONFIGURED, /* state */ - "floppy disk/tape controller" + "floppy disk/tape controller", + DC_CLS_MISC /* class */ } }; static inline void @@ -522,6 +524,10 @@ fdprobe(struct isa_device *dev) fdcdevs[fdcu] = dev; fdc_data[fdcu].baseport = dev->id_iobase; +#ifndef DEV_LKM + fdc_registerdev(dev); +#endif + /* First - lets reset the floppy controller */ outb(dev->id_iobase+FDOUT, 0); DELAY(100); @@ -553,8 +559,6 @@ fdattach(struct isa_device *dev) struct isa_device *fdup; int ic_type = 0; - fdc_registerdev(dev); - fdc->fdcu = fdcu; fdc->flags |= FDC_ATTACHED; fdc->dmachan = dev->id_drq; @@ -619,14 +623,20 @@ fdattach(struct isa_device *dev) case 0x80: printf("NEC 765\n"); fdc->fdct = FDC_NE765; + kdc_fdc[fdcu].kdc_description = + "NEC 765 floppy disk/tape controller"; break; case 0x81: printf("Intel 82077\n"); fdc->fdct = FDC_I82077; + kdc_fdc[fdcu].kdc_description = + "Intel 82077 floppy disk/tape controller"; break; case 0x90: printf("NEC 72065B\n"); fdc->fdct = FDC_NE72065; + kdc_fdc[fdcu].kdc_description = + "NEC 72065B floppy disk/tape controller"; break; default: printf("unknown IC type %02x\n", ic_type); @@ -685,33 +695,43 @@ fdattach(struct isa_device *dev) fd->options = 0; printf("fd%d: ", fdsu, fdu); + fd_registerdev(fdcu, fdu); switch (fdt) { case RTCFDT_12M: printf("1.2MB 5.25in\n"); fd->type = FD_1200; + kdc_fd[fdu].kdc_description = + "1.2MB (1200K) 5.25in floppy disk drive"; break; case RTCFDT_144M: printf("1.44MB 3.5in\n"); fd->type = FD_1440; + kdc_fd[fdu].kdc_description = + "1.44MB (1440K) 3.5in floppy disk drive"; break; case RTCFDT_288M: printf("2.88MB 3.5in - 1.44MB mode\n"); fd->type = FD_1440; + kdc_fd[fdu].kdc_description = + "2.88MB (2880K) 3.5in floppy disk drive in 1.44 mode"; break; case RTCFDT_360K: printf("360KB 5.25in\n"); fd->type = FD_360; + kdc_fd[fdu].kdc_description = + "360KB 5.25in floppy disk drive"; break; case RTCFDT_720K: printf("720KB 3.5in\n"); fd->type = FD_720; + kdc_fd[fdu].kdc_description = + "720KB 3.5in floppy disk drive"; break; default: printf("unknown\n"); fd->type = NO_TYPE; break; } - fd_registerdev(fdcu, fdu); kdc_fd[fdu].kdc_state = DC_IDLE; if (dk_ndrive < DK_NDRIVE) { sprintf(dk_names[dk_ndrive], "fd%d", fdu); diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c index 095725f..5e85521 100644 --- a/sys/dev/ie/if_ie.c +++ b/sys/dev/ie/if_ie.c @@ -43,7 +43,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ie.c,v 1.21 1995/03/19 14:28:45 davidg Exp $ + * $Id: if_ie.c,v 1.22 1995/03/28 07:55:31 bde Exp $ */ /* @@ -314,18 +314,18 @@ static struct kern_devconf kdc_ie[NIE] = { { isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, /* parent */ 0, /* parentdata */ - DC_BUSY, /* network interfaces are always ``busy'' */ - "" + DC_UNCONFIGURED, /* state */ + "Ethernet adapter", /* description */ + DC_CLS_NETIF /* class */ } }; static inline void -ie_registerdev(struct isa_device *id, const char *descr) +ie_registerdev(struct isa_device *id) { if(id->id_unit) kdc_ie[id->id_unit] = kdc_ie[0]; kdc_ie[id->id_unit].kdc_unit = id->id_unit; kdc_ie[id->id_unit].kdc_isa = id; - kdc_ie[id->id_unit].kdc_description = descr; dev_attach(&kdc_ie[id->id_unit]); } @@ -335,6 +335,8 @@ int ieprobe(dvp) { int ret; + ie_registerdev(dvp); + ret = sl_probe(dvp); if(!ret) ret = el_probe(dvp); if(!ret) ret = ni_probe(dvp); @@ -591,7 +593,7 @@ ieattach(dvp) #endif if_attach(ifp); - ie_registerdev(dvp, ie_hardware_names[ie_softc[unit].hard_type]); + kdc_ie[unit].kdc_description = ie_hardware_names[ie_softc[unit].hard_type]; { struct ifaddr *ifa = ifp->if_addrlist; diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index 305b7fc..e1105eb 100644 --- a/sys/dev/lnc/if_lnc.c +++ b/sys/dev/lnc/if_lnc.c @@ -150,7 +150,8 @@ static struct kern_devconf kdc_lnc = { &kdc_isa0, /* parent */ 0, /* parentdata */ DC_UNCONFIGURED, - "" + "", + DC_CLS_NETIF }; inline void diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 338fabf..1b96801 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -40,7 +40,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.39 1995/02/23 17:40:16 ache Exp $ + * $Id: mcd.c,v 1.40 1995/03/28 07:55:42 bde Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -223,8 +223,9 @@ static struct kern_devconf kdc_mcd[NMCD] = { { isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, /* parent */ 0, /* parentdata */ - DC_IDLE, /* status */ - "Mitsumi CD-ROM controller" /* properly filled later */ + DC_UNCONFIGURED, /* status */ + "Mitsumi CD-ROM controller", /* properly filled later */ + DC_CLS_RDISK } }; static inline void @@ -250,7 +251,7 @@ int mcd_attach(struct isa_device *dev) /* wire controller for interrupts and dma */ mcd_configure(cd); #endif - mcd_registerdev(dev); + kdc_mcd[dev->id_unit].kdc_state = DC_IDLE; /* name filled in probe */ kdc_mcd[dev->id_unit].kdc_description = mcd_data[dev->id_unit].name; @@ -702,6 +703,7 @@ mcd_probe(struct isa_device *dev) int status; unsigned char stbytes[3]; + mcd_registerdev(dev); mcd_data[unit].flags = MCDPROBING; #ifdef NOTDEF diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c index de7b26d..a2c5ef3 100644 --- a/sys/dev/mse/mse.c +++ b/sys/dev/mse/mse.c @@ -11,7 +11,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $Id: mse.c,v 1.9 1994/11/08 05:41:34 jkh Exp $ + * $Id: mse.c,v 1.10 1995/03/28 07:55:44 bde Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -181,6 +181,27 @@ struct mse_types { { 0, }, }; +static struct kern_devconf kdc_mse[NMSE] = { { + 0, 0, 0, /* filled in by dev_attach */ + "mse", 0, { MDDT_ISA, 0, "tty" }, + isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, + &kdc_isa0, /* parent */ + 0, /* parentdata */ + DC_UNCONFIGURED, /* state */ + "ATI or Logitech bus mouse adapter", + DC_CLS_MISC /* class */ +} }; + +static inline void +mse_registerdev(struct isa_device *id) +{ + if(id->id_unit) + kdc_mse[id->id_unit] = kdc_mse[0]; + kdc_mse[id->id_unit].kdc_unit = id->id_unit; + kdc_mse[id->id_unit].kdc_isa = id; + dev_attach(&kdc_mse[id->id_unit]); +} + int mseprobe(idp) register struct isa_device *idp; @@ -188,6 +209,7 @@ mseprobe(idp) register struct mse_softc *sc = &mse_sc[idp->id_unit]; register int i; + mse_registerdev(idp); /* * Check for each mouse type in the table. */ @@ -205,26 +227,6 @@ mseprobe(idp) return (0); } -static struct kern_devconf kdc_mse[NMSE] = { { - 0, 0, 0, /* filled in by dev_attach */ - "mse", 0, { MDDT_ISA, 0, "tty" }, - isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, - &kdc_isa0, /* parent */ - 0, /* parentdata */ - DC_UNKNOWN, /* not supported */ - "ATI or Logitech bus mouse adapter" -} }; - -static inline void -mse_registerdev(struct isa_device *id) -{ - if(id->id_unit) - kdc_mse[id->id_unit] = kdc_mse[0]; - kdc_mse[id->id_unit].kdc_unit = id->id_unit; - kdc_mse[id->id_unit].kdc_isa = id; - dev_attach(&kdc_mse[id->id_unit]); -} - int mseattach(idp) struct isa_device *idp; @@ -232,7 +234,7 @@ mseattach(idp) struct mse_softc *sc = &mse_sc[idp->id_unit]; sc->sc_port = idp->id_iobase; - mse_registerdev(idp); + kdc_mse[idp->id_unit].kdc_state = DC_IDLE; return (1); } @@ -253,6 +255,7 @@ mseopen(dev, flag) if (sc->sc_flags & MSESC_OPEN) return (EBUSY); sc->sc_flags |= MSESC_OPEN; + kdc_mse[MSE_UNIT(dev)].kdc_state = DC_BUSY; sc->sc_obuttons = sc->sc_buttons = 0x7; sc->sc_deltax = sc->sc_deltay = 0; sc->sc_bytesread = PROTOBYTES; @@ -280,6 +283,7 @@ mseclose(dev, flag) s = spltty(); (*sc->sc_disablemouse)(sc->sc_port); sc->sc_flags &= ~MSESC_OPEN; + kdc_mse[MSE_UNIT(dev)].kdc_state = DC_IDLE; splx(s); return(0); } diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c index 0959c8e..0f1973f 100644 --- a/sys/dev/scd/scd.c +++ b/sys/dev/scd/scd.c @@ -41,7 +41,7 @@ */ -/* $Id: scd.c,v 1.1 1995/03/24 18:33:00 jkh Exp $ */ +/* $Id: scd.c,v 1.2 1995/03/25 18:14:37 bde Exp $ */ /* Please send any comments to micke@dynas.se */ @@ -194,8 +194,9 @@ static struct kern_devconf kdc_scd[NSCD] = { { isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, /* parent */ 0, /* parentdata */ - DC_IDLE, /* status */ - "Sony CD-ROM drive" /* properly filled later */ + DC_UNCONFIGURED, /* status */ + "Sony CD-ROM drive", /* properly filled later */ + DC_CLS_RDISK /* class */ } }; static inline void @@ -215,7 +216,7 @@ int scd_attach(struct isa_device *dev) cd->iobase = dev->id_iobase; /* Already set by probe, but ... */ - scd_registerdev(dev); + kdc_scd[dev->id_unit].kdc_state = DC_IDLE; /* name filled in probe */ kdc_scd[dev->id_unit].kdc_description = scd_data[dev->id_unit].name; printf("scd%d: <%s>\n", dev->id_unit, scd_data[dev->id_unit].name); @@ -709,6 +710,8 @@ scd_probe(struct isa_device *dev) bzero(&drive_config, sizeof(drive_config)); + scd_registerdev(dev); + again: /* Reset drive */ write_control(dev->id_iobase, CBIT_RESET_DRIVE); diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index f03bdbd..d7d787b 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.88 1995/04/04 16:26:04 ache Exp $ + * $Id: sio.c,v 1.89 1995/04/11 17:58:09 ache Exp $ */ #include "sio.h" @@ -347,6 +347,31 @@ static struct speedtab comspeedtab[] = { /* XXX - configure this list */ static Port_t likely_com_ports[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, }; +static struct kern_devconf kdc_sio[NSIO] = { { + 0, 0, 0, /* filled in by dev_attach */ + "sio", 0, { MDDT_ISA, 0, "tty" }, + isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, + &kdc_isa0, /* parent */ + 0, /* parentdata */ + DC_UNCONFIGURED, + "RS-232 serial port" +} }; + +static void +sioregisterdev(id) + struct isa_device *id; +{ + int unit; + + unit = id->id_unit; + if (unit != 0) + kdc_sio[unit] = kdc_sio[0]; + kdc_sio[unit].kdc_unit = unit; + kdc_sio[unit].kdc_isa = id; + kdc_sio[unit].kdc_state = DC_IDLE; + dev_attach(&kdc_sio[unit]); +} + static int sioprobe(dev) struct isa_device *dev; @@ -360,6 +385,8 @@ sioprobe(dev) u_char mcr_image; int result; + sioregisterdev(dev); + if (!already_init) { /* * Turn off MCR_IENABLE for all likely serial ports. An unused @@ -535,31 +562,6 @@ sioprobe(dev) return (result); } -static struct kern_devconf kdc_sio[NSIO] = { { - 0, 0, 0, /* filled in by dev_attach */ - "sio", 0, { MDDT_ISA, 0, "tty" }, - isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, - &kdc_isa0, /* parent */ - 0, /* parentdata */ - DC_UNCONFIGURED, - "RS-232 serial port" -} }; - -static void -sioregisterdev(id) - struct isa_device *id; -{ - int unit; - - unit = id->id_unit; - if (unit != 0) - kdc_sio[unit] = kdc_sio[0]; - kdc_sio[unit].kdc_unit = unit; - kdc_sio[unit].kdc_isa = id; - kdc_sio[unit].kdc_state = DC_IDLE; - dev_attach(&kdc_sio[unit]); -} - static int sioattach(isdp) @@ -634,6 +636,8 @@ sioattach(isdp) #ifdef DSI_SOFT_MODEM if((inb(iobase+7) ^ inb(iobase+7)) & 0x80) { printf(" Digicom Systems, Inc. SoftModem"); + kdc_sio[isdp->id_unit].kdc_description = + "Serial port: Digicom Systems SoftModem"; goto determined_type; } #endif /* DSI_SOFT_MODEM */ @@ -654,6 +658,8 @@ sioattach(isdp) outb(iobase + com_scr, scr); if (scr1 != 0xa5 || scr2 != 0x5a) { printf(" 8250"); + kdc_sio[isdp->id_unit].kdc_description = + "Serial port: National 8250 or compatible"; goto determined_type; } } @@ -662,21 +668,31 @@ sioattach(isdp) switch (inb(com->int_id_port) & IIR_FIFO_MASK) { case FIFO_TRIGGER_1: printf(" 16450"); + kdc_sio[isdp->id_unit].kdc_description = + "Serial port: National 16450 or compatible"; break; case FIFO_TRIGGER_4: printf(" 16450?"); + kdc_sio[isdp->id_unit].kdc_description = + "Serial port: maybe National 16450"; break; case FIFO_TRIGGER_8: printf(" 16550?"); + kdc_sio[isdp->id_unit].kdc_description = + "Serial port: maybe National 16550"; break; case FIFO_TRIGGER_14: printf(" 16550A"); - if (COM_NOFIFO(isdp)) + if (COM_NOFIFO(isdp)) { printf(" fifo disabled"); - else { + kdc_sio[isdp->id_unit].kdc_description = + "Serial port: National 16550A, FIFO disabled"; + } else { com->hasfifo = TRUE; com->ftl_init = FIFO_TRIGGER_14; com->tx_fifo_size = 16; + kdc_sio[isdp->id_unit].kdc_description = + "Serial port: National 16550A or compatible"; } break; } @@ -696,7 +712,8 @@ determined_type: ; #endif /* COM_MULTIPORT */ printf("\n"); - sioregisterdev(isdp); + kdc_sio[unit].kdc_state = + (unit == comconsole) ? DC_BUSY : DC_IDLE; #ifdef KGDB if (kgdb_dev == makedev(commajor, unit)) { @@ -718,6 +735,7 @@ determined_type: ; outb(iobase + com_cfcr, CFCR_8BITS); outb(com->modem_status_port, com->mcr_image |= MCR_DTR | MCR_RTS); + kdc_sio[unit].kdc_state = DC_BUSY; if (kgdb_debug_init) { /* @@ -891,6 +909,7 @@ open_top: disc_optim(tp, &(tp->t_termios), com); if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK) com->active_out = TRUE; + kdc_sio[unit].kdc_state = DC_BUSY; out: splx(s); if (!(tp->t_state & TS_ISOPEN) && com->wopeners == 0) @@ -910,11 +929,13 @@ sioclose(dev, flag, mode, p) int mynor; int s; struct tty *tp; + int unit; mynor = minor(dev); if (mynor & CONTROL_MASK) return (0); - com = com_addr(MINOR_TO_UNIT(mynor)); + unit = MINOR_TO_UNIT(mynor); + com = com_addr(unit); tp = com->tp; s = spltty(); (*linesw[tp->t_line].l_close)(tp, flag); @@ -922,6 +943,7 @@ sioclose(dev, flag, mode, p) siostop(tp, FREAD | FWRITE); comhardclose(com); ttyclose(tp); + kdc_sio[unit].kdc_state = DC_IDLE; splx(s); return (0); } diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 41fa3eb..020fa13 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.107 1995/03/03 08:37:07 sos Exp $ + * $Id: syscons.c,v 1.111 1995/04/04 20:06:26 sos Exp $ */ #include "sc.h" @@ -203,7 +203,8 @@ static struct kern_devconf kdc_sc[NSC] = { &kdc_isa0, /* parent */ 0, /* parentdata */ DC_BUSY, /* the console is almost always busy */ - "Graphics console" + "Graphics console", + DC_CLS_DISPLAY /* class */ }; static inline void |