From nobody@FreeBSD.org  Thu Jan 12 21:43:40 2006
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 28D5B16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Jan 2006 21:43:40 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BDC9543D45
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Jan 2006 21:43:35 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0CLhY9U089461
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Jan 2006 21:43:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k0CLhYtf089460;
	Thu, 12 Jan 2006 21:43:34 GMT
	(envelope-from nobody)
Message-Id: <200601122143.k0CLhYtf089460@www.freebsd.org>
Date: Thu, 12 Jan 2006 21:43:34 GMT
From: Miles Nordin <carton@Ivy.NET>
To: freebsd-gnats-submit@FreeBSD.org
Subject: IDE corruption on ICH controller, affects the channel disk was plugged into at boot only
X-Send-Pr-Version: www-2.3

>Number:         91723
>Category:       kern
>Synopsis:       [ata] IDE corruption on ICH controller, affects the channel disk was plugged into at boot only
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 12 21:50:04 GMT 2006
>Closed-Date:    Sun May 06 00:51:48 GMT 2007
>Last-Modified:  Sun May 06 00:51:48 GMT 2007
>Originator:     Miles Nordin
>Release:        6.0
>Organization:
>Environment:
FreeBSD cortez 6.0-RELEASE FreeBSD 6.0-RELEASE #1: Tue Nov  8 20:23:54 UTC 2005 carton@cortez:/usr/src/sys/i386/compile/CORTEZ i386
>Description:
I'm booting this system over PXE so I can more effectively diagnose this
IDE problem.  The system isn't in production, so I'm happy to test things.

If I boot up the system normally, I see repeatable data corruption writing
to the disk by executing the following command:

bsdlabel -w -B ad0; bsdlabel ad0
bsdlabel: /dev/ad0: no valid label found

If I put the disk into PIO4 mode:

atacontrol mode ad0 pio4

then the corruption goes away.  If I put it back into UDMA33 mode, the
corruption returns.  Corruption seen with that bsdlabel write-then-read
command is repeatable every time---prints the error in UDMA33, works in PIO4.

If I detach and retach the ata0 bus:

atacontrol detach ata0; atacontrol attach ata0

the corruption stays.  If I detach both busses:

atacontrol detach ata0; atacontrol detach ata1
[hot-swap the drive to the secondary controller]
atacontrol attach ata1
bsdlabel -w -B ad2; bsdlabel ad2

then the disk _works fine_.  Even in UDMA33 mode.

If I reboot the machine with the disk plugged into the secondary IDE
controller, then hot-swap it to the primary controller using the above
procedure, then the primary controller works fine, and the secondary
is broken in UDMA33 mode.

If I boot the machine with the hard disk's power connector unplugged,
then plug in the power connector, then 'atacontrol detach ata0; atacontrol
attach ata0', then the disk also works fine in UDMA33 mode.

I did try swapping the cable in one of the broken configurations, and the
problem stays even with a fresh cable.  However, I'd think the fact that I
can make the problem manifest or go away, repeatably, by following a certain
simple script of actions proves that the cable is good, and there's something
wrong with the way the BIOS and the FreeBSD driver are setting up the IDE
controller.

This is FreeBSD 6.0 with an Intel ICH IDE controller and an old 8GB western
digital drive.

>How-To-Repeat:
              
>Fix:
              
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Thu Apr 19 06:40:34 UTC 2007 
State-Changed-Why:  
Does this still recur on FreeBSD 6.2? 


Responsible-Changed-From-To: freebsd-bugs->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Apr 19 06:40:34 UTC 2007 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=91723 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sun May 6 00:51:22 UTC 2007 
State-Changed-Why:  
Feedback timeout. 

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