From root@johncoop.MSHOME  Thu Dec 28 14:11:47 2000
Return-Path: <root@johncoop.MSHOME>
Received: from johncoop.MSHOME (dsl-154.bmi.net [207.173.60.230])
	by hub.freebsd.org (Postfix) with ESMTP id A446937B400
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 28 Dec 2000 14:11:45 -0800 (PST)
Received: (from root@localhost)
	by johncoop.MSHOME (8.11.1/8.11.1) id eBSMBhY00648;
	Thu, 28 Dec 2000 14:11:43 -0800 (PST)
	(envelope-from root)
Message-Id: <200012282211.eBSMBhY00648@johncoop.MSHOME>
Date: Thu, 28 Dec 2000 14:11:43 -0800 (PST)
From: jmcoopr@webmail.bmi.net
Sender: root@johncoop.MSHOME
Reply-To: jmcoopr@webmail.bmi.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: UDMA 66 Drive forced to PIO4 on DFI AK-74EC (VIA 686B) motherboard
X-Send-Pr-Version: 3.2

>Number:         23913
>Category:       kern
>Synopsis:       UDMA 66 Drive forced to PIO4 on DFI AK-74EC (VIA 686B) motherboard
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 28 14:20:00 PST 2000
>Closed-Date:    Wed May 30 02:38:57 PDT 2001
>Last-Modified:  Wed May 30 02:39:46 PDT 2001
>Originator:     John Merryweather Cooper
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
>Environment:

	CPU:  Athlon Duron 700
	Motherboard:  DFI AK74-EC, Rev. A2
	Motherboard BIOS:  Award v.6.0 (DFI 11/03/2000)
	Mounting root from ufs:/dev/ad0s1a
	Devices attached to IDE:
		ad0: 12416MB <QUANTUM FIREBALL CX13.0A> [25228/16/63] at ata0-master UDMA66
		acd0: CDROM <CD-ROM 45X> at ata1-master using PIO4
		afd0: 96MB <IOMEGA ZIP 100 ATAPI> [96/64/32] at ata1-slave using PIO3
	80-wire cables are used to connect ALL IDE devices

>Description:

	

On boot I get the following errors:

Mounting root from ufs:/dev/ad0s1a
ad0: UDMA ICRC WRITE ERROR blk# 416191 retrying
ad0: UDMA ICRC WRITE ERROR blk# 416191 retrying
ad0: UDMA ICRC WRITE ERROR blk# 416191 retrying
ad0: UDMA ICRC WRITE ERROR blk# 416191 falling back to PIO mode

Note that UDMA performance is quite good under OS/2 and/or WinDoze ME

>How-To-Repeat:

	

	100% repeatable (always happens--only the block# sometimes changes)
>Fix:

	
	I think this is a timing issue.  I had a similar issue with OS/2 Warp
	until the IDE driver was modified to use somewhat less aggressive IDE
	timings.  Then the issue went away on the OS/2 workstation.  Note that
	this harddrive and cable worked great under UDMA66 with an older
	motherboard (just replaced motherboard these past few days).




>Release-Note:
>Audit-Trail:

From: John Merryweather Cooper <jmcoopr@webmail.bmi.net>
To: freebsd-gnats-submit@FreeBSD.org, jmcoopr@webmail.bmi.net
Cc:  
Subject: Re: kern/23913: UDMA 66 Drive forced to PIO4 on DFI AK-74EC (VIA 686B) 
 motherboard
Date: Fri, 12 Jan 2001 17:55:55 -0800

 Looking at ata-all.c and ata-disk.c, I believe the problem is two-fold:
 
 1) the VIA 686B is NOT a VIA 686A -- in particular, the 686B supports
 UDMA Mode 5.  However, no prevision is made to identify it based on the
 different revision number--appears to Rev. 0x40 on my machine as opposed
 to Rev. 0x0 for a 686A.  Code needs to be added to ata-all to detect and
 properly initialize the 686B.
 
 2) I believe the fallback logic -- going from UDMA mode straight to PIO
 4 is a poor choice.  Going to PIO 4 masks the existence of hardware
 errors (all PIO modes lack any sort of hardware error detection; whereas
 UDMA modes have CRC error detection).  Particularly when initializing to
 UDMA modes 4 or 5, I believe the correct fallback should be to the next
 lower UDMA mode to preserve CRC error detection (and the reliability
 that it helps ensure) as long as possible.
 
 On the contrary for PIO devices though, the fallback should be PIO 0.
 In fact, I would appreciate a kernel option that allows me to force
 ATAPI devices like my ZIP drive to PIO 0 for this reason.
 
 YMMV.
 
 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Wed May 30 02:38:57 PDT 2001 
State-Changed-Why:  
The VIA 686B is support from 4.3 onward. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23913 
>Unformatted:
