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().
This commit is contained in:
parent
04d4d7cf05
commit
3a163803b7
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user