summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2001-09-27 17:00:25 +0000
committerjlemon <jlemon@FreeBSD.org>2001-09-27 17:00:25 +0000
commit9bbfbca6eef0284501a092fc334aada3a7725c8c (patch)
tree2e53c0df967253efb5747daf415cfd55296a2082 /sys/isa
parent0886aa51b6f6dcaa4d12a180a1a6a61bb37caeec (diff)
downloadFreeBSD-src-9bbfbca6eef0284501a092fc334aada3a7725c8c.zip
FreeBSD-src-9bbfbca6eef0284501a092fc334aada3a7725c8c.tar.gz
Gate low level console output on mtx_lock_spin(&sio_lock), if the
sio_lock has been initialized. This prevents the low level console output (kernel printf) from clobbering the sio settings if the system happens to be in the middle of comstart().
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/sio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 0234b80..a1c8495 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -3335,10 +3335,14 @@ siocnputc(dev, c)
else
iobase = siocniobase;
s = spltty();
+ if (sio_inited)
+ mtx_lock_spin(&sio_lock);
siocnopen(&sp, iobase, comdefaultrate);
siocntxwait(iobase);
outb(iobase + com_data, c);
siocnclose(&sp, iobase);
+ if (sio_inited)
+ mtx_unlock_spin(&sio_lock);
splx(s);
}
OpenPOWER on IntegriCloud