Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Sep 2003 15:54:36 +0200 (CEST)
From:      Soren Schmidt <sos@spider.deepcore.dk>
To:        w@dream.vg
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: ATAng still problematic
Message-ID:  <200309181354.h8IDsa0F023908@spider.deepcore.dk>
In-Reply-To: <20030918134850.GA22643@student.agh.edu.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309181354.h8IDsa0F023908>