diff options
author | kato <kato@FreeBSD.org> | 2000-01-29 04:47:22 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 2000-01-29 04:47:22 +0000 |
commit | debd5713de7e2f45e53fb553c5c1fe21d5306561 (patch) | |
tree | b496bd66a9ee89f31a682c59d039815b2eaf41bd /sys | |
parent | 9af864f09a4c885de02492adc44cc74b37652846 (diff) | |
download | FreeBSD-src-debd5713de7e2f45e53fb553c5c1fe21d5306561.zip FreeBSD-src-debd5713de7e2f45e53fb553c5c1fe21d5306561.tar.gz |
Synced with sys/isa/sio.c rev 1.287.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pc98/cbus/sio.c | 9 | ||||
-rw-r--r-- | sys/pc98/pc98/sio.c | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 0c3b62b..f9256e6 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -1128,6 +1128,7 @@ sioprobe(dev) if (COM_LLCONSOLE(flags)) { printf("sio%d: reserved for low-level i/o\n", device_get_unit(dev)); + bus_release_resource(dev, SYS_RES_IOPORT, rid, port); return (ENXIO); } @@ -1739,7 +1740,13 @@ sioattach(dev) if (siosetwater(com, com->it_in.c_ispeed) != 0) { enable_intr(); free(com, M_DEVBUF); - return ENXIO; + /* + * Leave i/o resources allocated if this is a `cn'-level + * console, so that other devices can't snarf them. + */ + if (iobase != siocniobase) + bus_release_resource(dev, SYS_RES_IOPORT, rid, port); + return (ENOMEM); } enable_intr(); termioschars(&com->it_in); diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 0c3b62b..f9256e6 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -1128,6 +1128,7 @@ sioprobe(dev) if (COM_LLCONSOLE(flags)) { printf("sio%d: reserved for low-level i/o\n", device_get_unit(dev)); + bus_release_resource(dev, SYS_RES_IOPORT, rid, port); return (ENXIO); } @@ -1739,7 +1740,13 @@ sioattach(dev) if (siosetwater(com, com->it_in.c_ispeed) != 0) { enable_intr(); free(com, M_DEVBUF); - return ENXIO; + /* + * Leave i/o resources allocated if this is a `cn'-level + * console, so that other devices can't snarf them. + */ + if (iobase != siocniobase) + bus_release_resource(dev, SYS_RES_IOPORT, rid, port); + return (ENOMEM); } enable_intr(); termioschars(&com->it_in); |