From nobody@FreeBSD.org  Sat Sep 25 03:11:15 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2677916A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 25 Sep 2004 03:11:15 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 182AF43D1F
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 25 Sep 2004 03:11:15 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i8P3BEkc049366
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 25 Sep 2004 03:11:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i8P3BEVP049359;
	Sat, 25 Sep 2004 03:11:14 GMT
	(envelope-from nobody)
Message-Id: <200409250311.i8P3BEVP049359@www.freebsd.org>
Date: Sat, 25 Sep 2004 03:11:14 GMT
From: Richard Clark <rdclark@nextquestion.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: WRITE_DMA errors with VIA 8237, UDMA100, and large drives
X-Send-Pr-Version: www-2.3

>Number:         72075
>Category:       kern
>Synopsis:       WRITE_DMA errors with VIA 8237, UDMA100, and large drives
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 25 03:20:23 GMT 2004
>Closed-Date:    Mon Oct 04 11:23:08 GMT 2004
>Last-Modified:  Mon Oct 04 11:23:08 GMT 2004
>Originator:     Richard Clark
>Release:        5.2.1
>Organization:
NextQuestion Consulting
>Environment:
FreeBSD karma.nextquestion.net 5.2.1-RELEASE-p5 FreeBSD 5.2.1-RELEASE-p5 #3: Tue May  4 21:31:35 PDT 2004     root@karma.nextquestion.net:/usr/obj/usr/src/sys/KARMA  i386

>Description:
After switching from a 60GB UDMA100 drive to a 250GB one (WD2500JB), I began getting WRITE_DMA errors:
ad2: WARNING - WRITE_DMA UDMA ICRC error (retrying request) LBA=101495087
ad2: WARNING - WRITE_DMA UDMA ICRC error (retrying request) LBA=101495087
ad2: FAILURE - WRITE_DMA status=51<READY,DSC,ERROR> error=84<ICRC,ABORTED> LBA=101495087

This problem has been mentioned on the FreeBSD mailing lists for both the VIA 8235 and 8237 and different manufacturer's disks. The only constant seems to be a size at or above 160GB.

http://lists.freebsd.org/pipermail/freebsd-questions/2004-June/050234.html
http://lists.freebsd.org/pipermail/freebsd-current/2004-July/031154.html

I've tried everything mentioned there, including a new drive cable (certified for UDMA133), disabling ACPI, etc. The only soultion I found was using atacontrol to drop to UDMA33.

From dmesg.boot:
CPU: AMD Athlon(tm) XP 2600+ (1909.03-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x6a0  Stepping = 0
  Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MM

atapci0: <VIA 8237 UDMA133 controller> port 0xcc00-0xcc0f at device 15.0 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata0: [MPSAFE]
ata1: at 0x170 irq 15 on atapci0
ata1: [MPSAFE]

GEOM: create disk ad0 dp=0xc4454360
ad0: 58643MB <HDS722580VLAT20> [119147/16/63] at ata0-master UDMA100
GEOM: create disk ad2 dp=0xc4449c60
ad2: 238475MB <WDC WD2500JB-00FUA0> [484521/16/63] at ata1-master UDMA100




>How-To-Repeat:
Install a UDMA100 or 133 drive >- 160GB on a VIA KT600 board w/ an 8235 or 8237. Set the speed to UDMA100 or 133.
>Fix:
Use atacontrol to drop to UDMA33 (a temporary fix, I hope!)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->sos 
Responsible-Changed-By: simon 
Responsible-Changed-When: Sat Sep 25 07:51:06 GMT 2004 
Responsible-Changed-Why:  
ata related, so over to sos for evaluation. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72075 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Mon Oct 4 11:19:42 GMT 2004 
State-Changed-Why:  
ICRC errors are due to bad or wrongly used cables, so please check  
that you have the right 80conductor cables (max 45cm long) and  
have them the right way around (blue connector at controller gray/black 
connectors at the drives. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=72075 
>Unformatted:
