Fix a potential hang situation.

PR:		i386/2108
This commit is contained in:
Luoqi Chen 1999-04-19 18:44:16 +00:00
parent ee35d927c2
commit 8e9aec89b1

View File

@ -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);