Merged from sys/dev/sio/sio.c revision 1.378.
This commit is contained in:
parent
49e387d30b
commit
14955691c1
@ -1948,6 +1948,7 @@ open_top:
|
||||
* XXX we should goto open_top if comparam() slept.
|
||||
*/
|
||||
if (com->hasfifo) {
|
||||
int i;
|
||||
/*
|
||||
* (Re)enable and drain fifos.
|
||||
*
|
||||
@ -1959,7 +1960,7 @@ open_top:
|
||||
* and to handle races between enabling and fresh
|
||||
* input.
|
||||
*/
|
||||
while (TRUE) {
|
||||
for (i = 0; i < 500; i++) {
|
||||
sio_setreg(com, com_fifo,
|
||||
FIFO_RCV_RST | FIFO_XMT_RST
|
||||
| com->fifo_image);
|
||||
@ -1992,6 +1993,10 @@ open_top:
|
||||
DELAY(50);
|
||||
(void) inb(com->data_port);
|
||||
}
|
||||
if (i == 500) {
|
||||
error = EIO;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
mtx_lock_spin(&sio_lock);
|
||||
|
@ -1948,6 +1948,7 @@ open_top:
|
||||
* XXX we should goto open_top if comparam() slept.
|
||||
*/
|
||||
if (com->hasfifo) {
|
||||
int i;
|
||||
/*
|
||||
* (Re)enable and drain fifos.
|
||||
*
|
||||
@ -1959,7 +1960,7 @@ open_top:
|
||||
* and to handle races between enabling and fresh
|
||||
* input.
|
||||
*/
|
||||
while (TRUE) {
|
||||
for (i = 0; i < 500; i++) {
|
||||
sio_setreg(com, com_fifo,
|
||||
FIFO_RCV_RST | FIFO_XMT_RST
|
||||
| com->fifo_image);
|
||||
@ -1992,6 +1993,10 @@ open_top:
|
||||
DELAY(50);
|
||||
(void) inb(com->data_port);
|
||||
}
|
||||
if (i == 500) {
|
||||
error = EIO;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
mtx_lock_spin(&sio_lock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user