It seems Jan Srzednicki wrote:
> First of all, the drive still does not get detected properly. Funny
> thing is that after some playing with atacontrol attach/detach, it
> finally gets detected. And later on, it is normally detected, before.
> Same scenario happened like 3 times with ATAng and newer and newer
> kernels. I don't know whether some device hints or anything are just
> updated; yet, I didn't have _any_ drive detection problems with ATAold.
> 
> The problem is with the second drive. There's still some randomness in
> it, as it gets undetected from time to time.

Try the below patch and let me know if that changes anything..

Index: ata-lowlevel.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-lowlevel.c,v
retrieving revision 1.13
diff -u -r1.13 ata-lowlevel.c
--- ata-lowlevel.c      16 Sep 2003 15:21:37 -0000      1.13
+++ ata-lowlevel.c      18 Sep 2003 07:55:10 -0000
@@ -551,11 +551,8 @@
                        ch->devices |= ATA_ATA_MASTER;
                    }
                }
-               else if (err == lsb && err == msb) {
-                   ATA_IDX_OUTB(ch, ATA_ERROR, 0xff);
-                   DELAY(10);
-                   if (stat0 == ATA_IDX_INB(ch, ATA_STATUS))
-                       stat0 |= ATA_S_BUSY;
+               else if ((stat0 & 0x4f) && err == lsb && err == msb) {
+                   stat0 |= ATA_S_BUSY;
                }
            }
        }
@@ -579,11 +576,8 @@
                        ch->devices |= ATA_ATA_SLAVE;
                    }
                }
-               else if (err == lsb && err == msb) {
-                   ATA_IDX_OUTB(ch, ATA_ERROR, 0xff);
-                   DELAY(10);
-                   if (stat1 == ATA_IDX_INB(ch, ATA_STATUS))
-                       stat1 |= ATA_S_BUSY;
+               else if ((stat1 & 0x4f) && err == lsb && err == msb) {
+                   stat1 |= ATA_S_BUSY;
                }
            }
        }

-Søren
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to