ATA still broken
Lefteris Chatzibarbas
lefcha at hellug.gr
Mon Feb 2 07:38:29 PST 2004
On Thu, Jan 29, 2004 at 12:37:35PM +0100, S?ren Schmidt wrote:
> Lefteris Chatzibarbas wrote:
> >After the "sos 2004/01/11 14:08:35 PST" commit mentionted in my previous
> >mail, system hangs during boot and I have already sent a more detailed
> >message (hardware, verbose boot, etc.) about this on freebsd-current@ a
> >couple of days ago (some threads above this):
> >
> > Date: Sun, 25 Jan 2004 13:17:43 +0200
> > Subject: System still hangs with "ata1-master: TIMEOUT - SETFEATURES SET
> > TRANSFER MODE"
> >
> > http://lists.freebsd.org/pipermail/freebsd-current/2004-January/019497.html
>
> Well I have no idea whats causing this except those drives does
> something they shouldn't.
>
> I'll try to get ahold of one of those faulty devices, but until then
> your best bet is to dive in yourself and try to figure out what goes
> wrong. I think we have a Liteon at work that I'll hopefully be able to
> borrow late next week, of that shows the troublesome behavior I'll work
> on a solution..
I've been able to boot and have all my devices correctly probed with the
attached patch. It seems that it is this change that you made to
sys/dev/ata/ata-lowlevel.c, that my system does not like.
-------------- next part --------------
--- sys/dev/ata/ata-lowlevel.c~ Sun Feb 1 14:45:41 2004
+++ sys/dev/ata/ata-lowlevel.c Mon Feb 2 16:47:14 2004
@@ -645,10 +645,6 @@
DELAY(100000);
}
- /* enable interrupt */
- DELAY(10);
- ATA_IDX_OUTB(ch, ATA_ALTSTAT, ATA_A_4BIT);
-
if (stat0 & ATA_S_BUSY)
mask &= ~0x01;
if (stat1 & ATA_S_BUSY)
@@ -732,6 +728,9 @@
ata_prtdev(atadev, "timeout sending command=%02x\n", command);
return -1;
}
+
+ /* enable interrupt */
+ ATA_IDX_OUTB(atadev->channel, ATA_ALTSTAT, ATA_A_4BIT);
/* only use 48bit addressing if needed (avoid bugs and overhead) */
if ((lba > 268435455 || count > 256) && atadev->param &&
More information about the freebsd-current
mailing list