summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-10-21 00:55:36 +0000
committerphk <phk@FreeBSD.org>1995-10-21 00:55:36 +0000
commit6d6a401f8b20e250ab7d9a640a899fae0c5a017c (patch)
treed1751df070258ce118a4222568849a39456c07d5 /sys/dev/sio
parent8deb9482ef65a6a3a773ac996395624316ba29cc (diff)
downloadFreeBSD-src-6d6a401f8b20e250ab7d9a640a899fae0c5a017c.zip
FreeBSD-src-6d6a401f8b20e250ab7d9a640a899fae0c5a017c.tar.gz
A mixed bag of changes, relating to getting the state in "lsdev" right,
and pccard support to work sensibly. Better by far, but still not good.
Diffstat (limited to 'sys/dev/sio')
-rw-r--r--sys/dev/sio/sio.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index c811dcc..a7b48ea 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.112 1995/09/19 12:37:41 phk Exp $
+ * $Id: sio.c,v 1.113 1995/09/24 04:59:16 davidg Exp $
*/
#include "sio.h"
@@ -358,7 +358,7 @@ static struct kern_devconf kdc_sio[NSIO] = { {
&kdc_isa0, /* parent */
0, /* parentdata */
DC_UNCONFIGURED, /* state */
- "RS-232 serial port",
+ "Serial port",
DC_CLS_SERIAL /* class */
} };
#if NCRD > 0
@@ -449,6 +449,12 @@ siounload(struct pccard_dev *dp)
int s,unit,nowhere;
com = com_addr(dp->isahd.id_unit);
+ if (!com->iobase) {
+ printf("sio%d already unloaded!\n",dp->isahd.id_unit);
+ return;
+ }
+ kdc_sio[com->unit].kdc_state = DC_UNCONFIGURED;
+ kdc_sio[com->unit].kdc_description = "Serial port";
if (com->tp && (com->tp->t_state & TS_ISOPEN)) {
com->gone = 1;
printf("sio%d: unload\n", dp->isahd.id_unit);
@@ -493,6 +499,8 @@ sioregisterdev(id)
return;
if (unit != 0)
kdc_sio[unit] = kdc_sio[0];
+ kdc_sio[unit].kdc_state = DC_UNCONFIGURED;
+ kdc_sio[unit].kdc_description = "Serial port";
kdc_sio[unit].kdc_unit = unit;
kdc_sio[unit].kdc_isa = id;
dev_attach(&kdc_sio[unit]);
OpenPOWER on IntegriCloud