mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-19 15:33:56 +00:00
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
This commit is contained in:
parent
64ee4b5b08
commit
6ffb65e8b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68360
@ -47,6 +47,11 @@ INCLUDES+= -I$S/../include
|
||||
.else
|
||||
INCLUDES+= -I/usr/include
|
||||
.endif
|
||||
|
||||
# This hack lets us use the Intel ACPICA code without spamming a new
|
||||
# include path into 100+ source files.
|
||||
INCLUDES+= -I$S/contrib/dev/acpica/Subsystem/Include
|
||||
|
||||
COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h
|
||||
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
|
||||
|
||||
@ -252,7 +257,7 @@ kernel-reinstall kernel-reinstall.debug:
|
||||
chflags noschg ${DESTDIR}${KODIR}/${KERNEL_KO} ; \
|
||||
fi
|
||||
install -c -m 555 -o root -g wheel -fschg \
|
||||
${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL}
|
||||
${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}${KODIR}
|
||||
|
||||
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules)
|
||||
all: modules
|
||||
|
@ -241,6 +241,7 @@ i386/isa/pcvt/pcvt_kbd.c optional vt
|
||||
i386/isa/pcvt/pcvt_out.c optional vt
|
||||
i386/isa/pcvt/pcvt_sup.c optional vt
|
||||
i386/isa/pcvt/pcvt_vtf.c optional vt
|
||||
i386/isa/pmtimer.c optional pmtimer
|
||||
i386/isa/prof_machdep.c optional profiling-routine
|
||||
i386/isa/rc.c count rc
|
||||
#i386/isa/rp.c optional rp
|
||||
|
@ -91,6 +91,8 @@
|
||||
#include <isa/rtc.h>
|
||||
#endif
|
||||
|
||||
/* misuse a flag to identify format operation */
|
||||
|
||||
/* configuration flags */
|
||||
#define FDC_PRETEND_D0 (1 << 0) /* pretend drive 0 to be there */
|
||||
#define FDC_NO_FIFO (1 << 2) /* do not enable FIFO */
|
||||
@ -393,12 +395,14 @@ fdctl_wr_isa(fdc_p fdc, u_int8_t v)
|
||||
bus_space_write_1(fdc->ctlt, fdc->ctlh, 0, v);
|
||||
}
|
||||
|
||||
#if NCARD > 0
|
||||
static void
|
||||
fdctl_wr_pcmcia(fdc_p fdc, u_int8_t v)
|
||||
{
|
||||
bus_space_write_1(fdc->portt, fdc->porth, FDCTL+fdc->port_off, v);
|
||||
}
|
||||
#endif
|
||||
#endif /* PC98 */
|
||||
|
||||
#if 0
|
||||
|
||||
@ -956,6 +960,7 @@ fdc_pccard_probe(device_t dev)
|
||||
#ifndef PC98
|
||||
fdc->fdctl_wr = fdctl_wr_pcmcia;
|
||||
#endif
|
||||
|
||||
fdc->flags |= FDC_ISPCMCIA | FDC_NODMA;
|
||||
|
||||
/* Attempt to allocate our resources for the duration of the probe */
|
||||
@ -1155,6 +1160,69 @@ DRIVER_MODULE(fdc, pccard, fdc_pccard_driver, fdc_devclass, 0, 0);
|
||||
|
||||
#endif /* NCARD > 0 */
|
||||
|
||||
static void fd_clone __P((void *arg, char *name, int namelen, dev_t *dev));
|
||||
|
||||
static struct {
|
||||
char *match;
|
||||
int minor;
|
||||
int link;
|
||||
} fd_suffix[] = {
|
||||
{ "a", 0, 1 },
|
||||
{ "b", 0, 1 },
|
||||
{ "c", 0, 1 },
|
||||
{ "d", 0, 1 },
|
||||
{ "e", 0, 1 },
|
||||
{ "f", 0, 1 },
|
||||
{ "g", 0, 1 },
|
||||
{ "h", 0, 1 },
|
||||
{ ".1720", 1, 0 },
|
||||
{ ".1480", 2, 0 },
|
||||
{ ".1440", 3, 0 },
|
||||
{ ".1200", 4, 0 },
|
||||
{ ".820", 5, 0 },
|
||||
{ ".800", 6, 0 },
|
||||
{ ".720", 7, 0 },
|
||||
{ ".360", 8, 0 },
|
||||
{ ".640", 9, 0 },
|
||||
{ ".1232", 10, 0 },
|
||||
#ifdef PC98
|
||||
{ ".1280", 11, 0 },
|
||||
{ ".1476", 12, 0 },
|
||||
#endif
|
||||
{ 0, 0 }
|
||||
};
|
||||
static void
|
||||
fd_clone(arg, name, namelen, dev)
|
||||
void *arg;
|
||||
char *name;
|
||||
int namelen;
|
||||
dev_t *dev;
|
||||
{
|
||||
int u, d, i;
|
||||
char *n;
|
||||
dev_t pdev;
|
||||
|
||||
if (*dev != NODEV)
|
||||
return;
|
||||
if (dev_stdclone(name, &n, "fd", &u) != 2)
|
||||
return;
|
||||
for (i = 0; ; i++) {
|
||||
if (fd_suffix[i].match == NULL)
|
||||
return;
|
||||
if (strcmp(n, fd_suffix[i].match))
|
||||
continue;
|
||||
d = fd_suffix[i].minor;
|
||||
break;
|
||||
}
|
||||
if (fd_suffix[i].link == 0) {
|
||||
*dev = make_dev(&fd_cdevsw, (u << 6) + d,
|
||||
UID_ROOT, GID_OPERATOR, 0640, name);
|
||||
} else {
|
||||
pdev = makedev(fd_cdevsw.d_maj, (u << 6) + d);
|
||||
*dev = make_dev_alias(pdev, name);
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
/*
|
||||
* devices attached to the controller section.
|
||||
@ -1390,26 +1458,17 @@ static int
|
||||
fd_attach(device_t dev)
|
||||
{
|
||||
struct fd_data *fd;
|
||||
#if 0
|
||||
int i;
|
||||
int mynor;
|
||||
int typemynor;
|
||||
int typesize;
|
||||
#endif
|
||||
static int cdevsw_add_done = 0;
|
||||
|
||||
fd = device_get_softc(dev);
|
||||
|
||||
if (!cdevsw_add_done) {
|
||||
cdevsw_add(&fd_cdevsw); /* XXX */
|
||||
cdevsw_add_done++;
|
||||
cdevsw_add(&fd_cdevsw); /* XXX */
|
||||
cdevsw_add_done++;
|
||||
}
|
||||
EVENTHANDLER_REGISTER(dev_clone, fd_clone, 0, 1000);
|
||||
make_dev(&fd_cdevsw, (fd->fdu << 6),
|
||||
UID_ROOT, GID_OPERATOR, 0640, "rfd%d", fd->fdu);
|
||||
|
||||
#if 0
|
||||
/* Other make_dev() go here. */
|
||||
#endif
|
||||
UID_ROOT, GID_OPERATOR, 0640, "fd%d", fd->fdu);
|
||||
|
||||
/*
|
||||
* Export the drive to the devstat interface.
|
||||
@ -2575,7 +2634,7 @@ fdstate(fdc_p fdc)
|
||||
static int
|
||||
retrier(struct fdc_data *fdc)
|
||||
{
|
||||
register struct bio *bp;
|
||||
struct bio *bp;
|
||||
struct fd_data *fd;
|
||||
int fdu;
|
||||
|
||||
@ -2602,14 +2661,14 @@ retrier(struct fdc_data *fdc)
|
||||
default:
|
||||
fail:
|
||||
{
|
||||
dev_t sav_b_dev = bp->bio_dev;
|
||||
dev_t sav_bio_dev = bp->bio_dev;
|
||||
/* Trick diskerr */
|
||||
bp->bio_dev = makedev(major(bp->bio_dev),
|
||||
(FDUNIT(minor(bp->bio_dev))<<3)|RAW_PART);
|
||||
diskerr(bp, "hard error", LOG_PRINTF,
|
||||
fdc->fd->skip / DEV_BSIZE,
|
||||
(struct disklabel *)NULL);
|
||||
bp->bio_dev = sav_b_dev;
|
||||
bp->bio_dev = sav_bio_dev;
|
||||
if (fdc->flags & FDC_STAT_VALID)
|
||||
{
|
||||
printf(
|
||||
|
@ -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 @@ status_read:;
|
||||
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)
|
||||
|
@ -38,6 +38,7 @@ options FFS #Berkeley Fast Filesystem
|
||||
options FFS_ROOT #FFS usable as root device [keep this!]
|
||||
options SOFTUPDATES #Enable FFS soft updates support
|
||||
options MFS #Memory Filesystem
|
||||
#options DEVFS #Device Filesystem
|
||||
options MD_ROOT #MD is a potential root device
|
||||
options NFS #Network Filesystem
|
||||
options NFS_ROOT #NFS usable as root device, NFS required
|
||||
@ -97,6 +98,10 @@ device bs 1
|
||||
# PC-9801-100
|
||||
device aic
|
||||
|
||||
device ncv # NCR 53C500
|
||||
device nsp # Workbit Ninja SCSI-3
|
||||
device stg # TMC 18C30/18C50
|
||||
|
||||
# SCSI peripherals
|
||||
device scbus # SCSI bus (required)
|
||||
device da # Direct Access (disks)
|
||||
@ -156,6 +161,7 @@ device vx # 3Com 3c590, 3c595 (``Vortex'')
|
||||
device wx # Intel Gigabit Ethernet Card (``Wiseman'')
|
||||
|
||||
# PCI Ethernet NICs that use the common MII bus controller code.
|
||||
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
|
||||
device miibus # MII bus support
|
||||
device dc # DEC/Intel 21143 and various workalikes
|
||||
device pcn # AMD Am79C79x PCI 10/100 NICs
|
||||
@ -251,6 +257,7 @@ device bpf # Berkeley packet filter
|
||||
#device umass # Disks/Mass storage - Requires scbus and da
|
||||
#device ums # Mouse
|
||||
#device urio # Diamond Rio 500 MP3 player
|
||||
#device uscanner # Scanners
|
||||
# USB Ethernet, requires mii
|
||||
#device aue # ADMtek USB ethernet
|
||||
#device cue # CATC USB ethernet
|
||||
|
@ -1168,9 +1168,6 @@ union descriptor ldt[NLDT]; /* local descriptor table */
|
||||
struct region_descriptor r_gdt, r_idt;
|
||||
#endif
|
||||
|
||||
#ifndef SMP
|
||||
extern struct segment_descriptor common_tssd, *tss_gdt;
|
||||
#endif
|
||||
int private_tss; /* flag indicating private tss */
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
|
@ -337,7 +337,8 @@ static DEVCLASS_INFO devclass_names[] = {
|
||||
static DEV_INFO device_info[] = {
|
||||
/*---Name----- ---Description---------------------------------------------- */
|
||||
#ifdef PC98
|
||||
{"bs", "PC-9801-55 SCSI Interface", 0, CLS_STORAGE},
|
||||
{"bs", "PC-9801-55 SCSI Interface", 0, CLS_STORAGE},
|
||||
{"wdc", "IDE/ESDI/MFM disk controller", 0, CLS_STORAGE},
|
||||
#endif
|
||||
{"adv", "AdvanSys SCSI narrow controller", 0, CLS_STORAGE},
|
||||
{"bt", "Buslogic SCSI controller", 0, CLS_STORAGE},
|
||||
@ -345,7 +346,7 @@ static DEV_INFO device_info[] = {
|
||||
{"aic", "Adaptec 152x SCSI and compatible SCSI cards", 0, CLS_STORAGE},
|
||||
{"nca", "ProAudio Spectrum SCSI and compatibles", 0, CLS_STORAGE},
|
||||
{"sea", "Seagate ST01/ST02 SCSI and compatibles", 0, CLS_STORAGE},
|
||||
{"wdc", "IDE/ESDI/MFM disk controller", 0, CLS_STORAGE},
|
||||
{"stg", "TMC 18C30/18C50 based SCSI cards", 0, CLS_STORAGE},
|
||||
{"ata", "ATA/ATAPI compatible disk controller", 0, CLS_STORAGE},
|
||||
{"fdc", "Floppy disk controller", FLG_FIXED, CLS_STORAGE},
|
||||
{"mcd", "Mitsumi CD-ROM", 0, CLS_STORAGE},
|
||||
|
@ -91,6 +91,8 @@
|
||||
#include <isa/rtc.h>
|
||||
#endif
|
||||
|
||||
/* misuse a flag to identify format operation */
|
||||
|
||||
/* configuration flags */
|
||||
#define FDC_PRETEND_D0 (1 << 0) /* pretend drive 0 to be there */
|
||||
#define FDC_NO_FIFO (1 << 2) /* do not enable FIFO */
|
||||
@ -393,12 +395,14 @@ fdctl_wr_isa(fdc_p fdc, u_int8_t v)
|
||||
bus_space_write_1(fdc->ctlt, fdc->ctlh, 0, v);
|
||||
}
|
||||
|
||||
#if NCARD > 0
|
||||
static void
|
||||
fdctl_wr_pcmcia(fdc_p fdc, u_int8_t v)
|
||||
{
|
||||
bus_space_write_1(fdc->portt, fdc->porth, FDCTL+fdc->port_off, v);
|
||||
}
|
||||
#endif
|
||||
#endif /* PC98 */
|
||||
|
||||
#if 0
|
||||
|
||||
@ -956,6 +960,7 @@ fdc_pccard_probe(device_t dev)
|
||||
#ifndef PC98
|
||||
fdc->fdctl_wr = fdctl_wr_pcmcia;
|
||||
#endif
|
||||
|
||||
fdc->flags |= FDC_ISPCMCIA | FDC_NODMA;
|
||||
|
||||
/* Attempt to allocate our resources for the duration of the probe */
|
||||
@ -1155,6 +1160,69 @@ DRIVER_MODULE(fdc, pccard, fdc_pccard_driver, fdc_devclass, 0, 0);
|
||||
|
||||
#endif /* NCARD > 0 */
|
||||
|
||||
static void fd_clone __P((void *arg, char *name, int namelen, dev_t *dev));
|
||||
|
||||
static struct {
|
||||
char *match;
|
||||
int minor;
|
||||
int link;
|
||||
} fd_suffix[] = {
|
||||
{ "a", 0, 1 },
|
||||
{ "b", 0, 1 },
|
||||
{ "c", 0, 1 },
|
||||
{ "d", 0, 1 },
|
||||
{ "e", 0, 1 },
|
||||
{ "f", 0, 1 },
|
||||
{ "g", 0, 1 },
|
||||
{ "h", 0, 1 },
|
||||
{ ".1720", 1, 0 },
|
||||
{ ".1480", 2, 0 },
|
||||
{ ".1440", 3, 0 },
|
||||
{ ".1200", 4, 0 },
|
||||
{ ".820", 5, 0 },
|
||||
{ ".800", 6, 0 },
|
||||
{ ".720", 7, 0 },
|
||||
{ ".360", 8, 0 },
|
||||
{ ".640", 9, 0 },
|
||||
{ ".1232", 10, 0 },
|
||||
#ifdef PC98
|
||||
{ ".1280", 11, 0 },
|
||||
{ ".1476", 12, 0 },
|
||||
#endif
|
||||
{ 0, 0 }
|
||||
};
|
||||
static void
|
||||
fd_clone(arg, name, namelen, dev)
|
||||
void *arg;
|
||||
char *name;
|
||||
int namelen;
|
||||
dev_t *dev;
|
||||
{
|
||||
int u, d, i;
|
||||
char *n;
|
||||
dev_t pdev;
|
||||
|
||||
if (*dev != NODEV)
|
||||
return;
|
||||
if (dev_stdclone(name, &n, "fd", &u) != 2)
|
||||
return;
|
||||
for (i = 0; ; i++) {
|
||||
if (fd_suffix[i].match == NULL)
|
||||
return;
|
||||
if (strcmp(n, fd_suffix[i].match))
|
||||
continue;
|
||||
d = fd_suffix[i].minor;
|
||||
break;
|
||||
}
|
||||
if (fd_suffix[i].link == 0) {
|
||||
*dev = make_dev(&fd_cdevsw, (u << 6) + d,
|
||||
UID_ROOT, GID_OPERATOR, 0640, name);
|
||||
} else {
|
||||
pdev = makedev(fd_cdevsw.d_maj, (u << 6) + d);
|
||||
*dev = make_dev_alias(pdev, name);
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
/*
|
||||
* devices attached to the controller section.
|
||||
@ -1390,26 +1458,17 @@ static int
|
||||
fd_attach(device_t dev)
|
||||
{
|
||||
struct fd_data *fd;
|
||||
#if 0
|
||||
int i;
|
||||
int mynor;
|
||||
int typemynor;
|
||||
int typesize;
|
||||
#endif
|
||||
static int cdevsw_add_done = 0;
|
||||
|
||||
fd = device_get_softc(dev);
|
||||
|
||||
if (!cdevsw_add_done) {
|
||||
cdevsw_add(&fd_cdevsw); /* XXX */
|
||||
cdevsw_add_done++;
|
||||
cdevsw_add(&fd_cdevsw); /* XXX */
|
||||
cdevsw_add_done++;
|
||||
}
|
||||
EVENTHANDLER_REGISTER(dev_clone, fd_clone, 0, 1000);
|
||||
make_dev(&fd_cdevsw, (fd->fdu << 6),
|
||||
UID_ROOT, GID_OPERATOR, 0640, "rfd%d", fd->fdu);
|
||||
|
||||
#if 0
|
||||
/* Other make_dev() go here. */
|
||||
#endif
|
||||
UID_ROOT, GID_OPERATOR, 0640, "fd%d", fd->fdu);
|
||||
|
||||
/*
|
||||
* Export the drive to the devstat interface.
|
||||
@ -2575,7 +2634,7 @@ fdstate(fdc_p fdc)
|
||||
static int
|
||||
retrier(struct fdc_data *fdc)
|
||||
{
|
||||
register struct bio *bp;
|
||||
struct bio *bp;
|
||||
struct fd_data *fd;
|
||||
int fdu;
|
||||
|
||||
@ -2602,14 +2661,14 @@ retrier(struct fdc_data *fdc)
|
||||
default:
|
||||
fail:
|
||||
{
|
||||
dev_t sav_b_dev = bp->bio_dev;
|
||||
dev_t sav_bio_dev = bp->bio_dev;
|
||||
/* Trick diskerr */
|
||||
bp->bio_dev = makedev(major(bp->bio_dev),
|
||||
(FDUNIT(minor(bp->bio_dev))<<3)|RAW_PART);
|
||||
diskerr(bp, "hard error", LOG_PRINTF,
|
||||
fdc->fd->skip / DEV_BSIZE,
|
||||
(struct disklabel *)NULL);
|
||||
bp->bio_dev = sav_b_dev;
|
||||
bp->bio_dev = sav_bio_dev;
|
||||
if (fdc->flags & FDC_STAT_VALID)
|
||||
{
|
||||
printf(
|
||||
|
@ -1168,9 +1168,6 @@ union descriptor ldt[NLDT]; /* local descriptor table */
|
||||
struct region_descriptor r_gdt, r_idt;
|
||||
#endif
|
||||
|
||||
#ifndef SMP
|
||||
extern struct segment_descriptor common_tssd, *tss_gdt;
|
||||
#endif
|
||||
int private_tss; /* flag indicating private tss */
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
|
@ -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 @@ status_read:;
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user