diff options
author | luoqi <luoqi@FreeBSD.org> | 1999-04-19 18:44:16 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 1999-04-19 18:44:16 +0000 |
commit | 4e27fe5c86945f8b528a4d082daeaef60492463e (patch) | |
tree | cedcdcb4fe3d647cb66150a5277985b4044fa2ee | |
parent | 6339c0a99af81a56f93f75b133bd1fe3a6cff5a0 (diff) | |
download | FreeBSD-src-4e27fe5c86945f8b528a4d082daeaef60492463e.zip FreeBSD-src-4e27fe5c86945f8b528a4d082daeaef60492463e.tar.gz |
Fix a potential hang situation.
PR: i386/2108
-rw-r--r-- | sys/i386/isa/atapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/i386/isa/atapi.c b/sys/i386/isa/atapi.c index 2d76b8c..0efa4d5 100644 --- a/sys/i386/isa/atapi.c +++ b/sys/i386/isa/atapi.c @@ -887,7 +887,8 @@ struct atapires atapi_request_wait (struct atapi *ata, int unit, ac->cmd[13], ac->cmd[14], ac->cmd[15], count); atapi_enqueue (ata, ac); wdstart (ata->ctrlr); - tsleep ((caddr_t)ac, PRIBIO, "atareq", 0); + if (ata->tail == ac) + tsleep ((caddr_t)ac, PRIBIO, "atareq", 0); result = ac->result; atapi_free (ata, ac); |