Bug 23913

Summary: UDMA 66 Drive forced to PIO4 on DFI AK-74EC (VIA 686B) motherboard
Product: Base System Reporter: jmcoopr <jmcoopr>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-STABLE   
Hardware: Any   
OS: Any   

Description jmcoopr 2000-12-28 22:20:00 UTC
	

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

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).
How-To-Repeat: 
	

	100% repeatable (always happens--only the block# sometimes changes)
Comment 1 jmcoopr 2001-01-13 01:55:55 UTC
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.
Comment 2 Søren Schmidt freebsd_committer freebsd_triage 2001-05-30 10:38:57 UTC
State Changed
From-To: open->closed

The VIA 686B is support from 4.3 onward.