From owner-freebsd-questions Thu Jan 2 11:36:34 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4655637B401; Thu, 2 Jan 2003 11:36:31 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id D29E443EB2; Thu, 2 Jan 2003 11:36:29 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id GAA06502; Fri, 3 Jan 2003 06:36:23 +1100 Date: Fri, 3 Jan 2003 06:36:29 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Bruce Campbell Cc: freebsd-hardware@FreeBSD.ORG, Subject: Re: Followup to "fallback to PIO mode" on dual processor AMD systems In-Reply-To: <1041526384.3e146e708b8e4@www.nexusmail.uwaterloo.ca> Message-ID: <20030103062516.F755-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message