summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>1999-12-03 12:56:21 +0000
committernyan <nyan@FreeBSD.org>1999-12-03 12:56:21 +0000
commita9faa48e79740db3fc41086994094fc7b5470be1 (patch)
treec752d1344ad24a93998ec8535b2b9f7b2e40b64f /sys/i386
parentc0a34be120b2de37d57788f7bcfa77b2dcc24361 (diff)
downloadFreeBSD-src-a9faa48e79740db3fc41086994094fc7b5470be1.zip
FreeBSD-src-a9faa48e79740db3fc41086994094fc7b5470be1.tar.gz
pc98/pc98/atapi.c
Copied from i386/isa/atapi.c. Fixed to support slave devices. Ignore the device that has strange model strings. i386/isa/atapi.c Removed pc98 codes. Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/isa/atapi.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/sys/i386/isa/atapi.c b/sys/i386/isa/atapi.c
index 8576373..8ee0164 100644
--- a/sys/i386/isa/atapi.c
+++ b/sys/i386/isa/atapi.c
@@ -12,6 +12,8 @@
* all derivative works or modified versions.
*
* Version 1.9, Mon Oct 9 22:34:47 MSK 1995
+ *
+ * $FreeBSD$
*/
/*
@@ -366,18 +368,9 @@ static struct atapi_params *atapi_probe (int port, int unit)
{
struct atapi_params *ap;
char tb [DEV_BSIZE];
-#ifdef PC98
- int cnt;
- outb(0x432,unit%2);
- 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));
@@ -385,20 +378,8 @@ static struct atapi_params *atapi_probe (int port, int unit)
}
/* Issue ATAPI IDENTIFY command. */
-#ifdef PC98
- outb (port + AR_DRIVE, unit/2 ? ARD_DRIVE1 : ARD_DRIVE0);
-
- /* Wait for DRQ deassert. */
- for (cnt=2000; cnt>0; --cnt)
- if (! (inb (port + AR_STATUS) & ARS_DRQ))
- break;
-
- outb (port + AR_COMMAND, ATAPIC_IDENTIFY);
- DELAY(500);
-#else
outb (port + AR_DRIVE, unit ? ARD_DRIVE1 : ARD_DRIVE0);
outb (port + AR_COMMAND, ATAPIC_IDENTIFY);
-#endif
/* Check that device is present. */
if (inb (port + AR_STATUS) == 0xff) {
@@ -588,13 +569,7 @@ int atapi_start_cmd (struct atapi *ata, struct atapicmd *ac)
ac->result.error = 0;
ac->result.status = 0;
-#ifdef PC98
- outb(0x432,(ac->unit)%2);
- print(("(ac->unit) = %d,select %d (2) \n",(ac->unit),(ac->unit)%2));
- outb (ata->port + AR_DRIVE, (ac->unit)/2 ? ARD_DRIVE1 : ARD_DRIVE0);
-#else
outb (ata->port + AR_DRIVE, ac->unit ? ARD_DRIVE1 : ARD_DRIVE0);
-#endif
if (atapi_wait (ata->port, 0) < 0) {
printf ("atapi%d.%d: controller not ready for cmd\n",
ata->ctrlr, ac->unit);
@@ -676,11 +651,6 @@ int atapi_intr (int ctrlr)
struct atapi *ata = atapitab + ctrlr;
struct atapicmd *ac = ata->queue;
-#ifdef PC98
- outb(0x432,(ac->unit)%2);
- print(("atapi_intr:(ac->unit)= %d,select %d\n",ac->unit,(ac->unit)%2));
-#endif
-
if (! ac) {
printf ("atapi%d: stray interrupt\n", ata->ctrlr);
return (0);
OpenPOWER on IntegriCloud