On Thu, 2 Jan 2003, Bruce Campbell wrote:

> At present, I don't suspect bad media because the error message is
> "WRITE command timeout tag=0 serv=0" which doesn't suggest a specific
> sector/track etc, and running with UDMA33 instead of UDMA100 makes the problem
> appear to vanish.

The fallback is clearly wrong because it turns isolated media errors
into pessimized i/o for the whole disk at best, system hangs during
resets next best, and system crashes at worst.  I keep a disk with bad
media on line for testing some of this, and zap the fallback using the
following patch (hope this is complete; it was edited from a larger
patch).

%%%
Index: ata-disk.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v
retrieving revision 1.139
diff -u -2 -r1.139 ata-disk.c
--- ata-disk.c  17 Dec 2002 16:26:22 -0000      1.139
+++ ata-disk.c  18 Dec 2002 01:03:37 -0000
@@ -597,5 +606,5 @@
            else {
                ata_dmainit(adp->device, ata_pmode(adp->device->param), -1, -1);
-               printf(" falling back to PIO mode\n");
+               printf(" NOT falling back to PIO mode\n");
            }
            TAILQ_INSERT_HEAD(&adp->device->channel->ata_queue, request, chain);
@@ -603,4 +612,5 @@
        }

+#if 0
        /* if using DMA, try once again in PIO mode */
        if (request->flags & ADR_F_DMA_USED) {
@@ -613,4 +623,5 @@
            return ATA_OP_FINISHED;
        }
+#endif

        request->flags |= ADR_F_ERROR;
%%%

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to