Check the status port after waiting for DRQ; some drives seem to be very
slow coming off the bus (eg. Iomega's ATAPI Zip). Failure to do this results in a false probe of an ATAPI device with garbage data.
This commit is contained in:
parent
3bbee664ba
commit
facf6a3fbe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32825
@ -422,6 +422,15 @@ static struct atapi_params *atapi_probe (int port, int unit)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* check that DRQ isn't a fake */
|
||||
if (inb (port + AR_STATUS) == 0xff) {
|
||||
print (("atapiX.%d at 0x%x: no device\n", unit, port));
|
||||
if (unit == 1)
|
||||
/* Select unit 0. */
|
||||
outb (port + AR_DRIVE, ARD_DRIVE0);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Obtain parameters. */
|
||||
insw (port + AR_DATA, tb, sizeof(tb) / sizeof(short));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user