diff options
author | sos <sos@FreeBSD.org> | 1997-05-23 16:22:04 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1997-05-23 16:22:04 +0000 |
commit | 1dab91ea8db7b817dfe23cc8c51b95b1f60061c5 (patch) | |
tree | 284c23f27059055b7fdf402e59008f4411eafc9c /sys/i386/isa/atapi.c | |
parent | 8e5453d5908275235bcba50c210ab6f958b5356a (diff) | |
download | FreeBSD-src-1dab91ea8db7b817dfe23cc8c51b95b1f60061c5.zip FreeBSD-src-1dab91ea8db7b817dfe23cc8c51b95b1f60061c5.tar.gz |
Fix support for the Hitachi CDR7730 IDE cdrom drive.
Patch from pr1730.
Tested on our IDE cdrom drive farm...
Diffstat (limited to 'sys/i386/isa/atapi.c')
-rw-r--r-- | sys/i386/isa/atapi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/i386/isa/atapi.c b/sys/i386/isa/atapi.c index 05b8e45..6a85cfd 100644 --- a/sys/i386/isa/atapi.c +++ b/sys/i386/isa/atapi.c @@ -612,7 +612,7 @@ int atapi_wait_cmd (struct atapi *ata, struct atapicmd *ac) ireason = inb (ata->port + AR_IREASON); ac->result.status = inb (ata->port + AR_STATUS); phase = (ireason & (ARI_CMD | ARI_IN)) | - (ac->result.status & ARS_DRQ); + (ac->result.status & (ARS_DRQ | ARS_BSY)); if (phase == PHASE_CMDOUT) break; DELAY (10); @@ -929,9 +929,11 @@ struct atapires atapi_request_immediate (struct atapi *ata, int unit, /* Do all needed i/o. */ while (atapi_io (ata, ac)) /* Wait for DRQ deassert. */ - for (cnt=2000; cnt>0; --cnt) + for (cnt=2000; cnt>0; --cnt) { if (! (inb (ata->port + AR_STATUS) & ARS_DRQ)) break; + DELAY(10); + } } return (ac->result); } |