Fixed unit select code in atapi_probe (PC98 specific).

This commit is contained in:
KATO Takenori 1997-01-17 16:58:38 +00:00
parent 135c95a582
commit b2f4ff0875
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=21807

View File

@ -365,7 +365,11 @@ static struct atapi_params *atapi_probe (int port, int unit)
print(("unit = %d,select %d\n",unit,unit%2));
#endif
/* Wait for controller not busy. */
#ifdef PC98
outb (port + AR_DRIVE, unit / 2 ? ARD_DRIVE1 : ARD_DRIVE0);
#else
outb (port + AR_DRIVE, unit ? ARD_DRIVE1 : ARD_DRIVE0);
#endif
if (atapi_wait (port, 0) < 0) {
print (("atapiX.%d at 0x%x: controller busy, status=%b\n",
unit, port, inb (port + AR_STATUS), ARS_BITS));