From fduch@fdu4.antar.bryansk.ru  Thu Nov  8 08:38:48 2012
Return-Path: <fduch@fdu4.antar.bryansk.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 20B254C5
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  8 Nov 2012 08:38:48 +0000 (UTC)
	(envelope-from fduch@fdu4.antar.bryansk.ru)
Received: from fdu4.antar.bryansk.ru (fdu4.antar.bryansk.ru [62.122.184.125])
	by mx1.freebsd.org (Postfix) with ESMTP id 882E98FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  8 Nov 2012 08:38:47 +0000 (UTC)
Received: from fdu4.antar.bryansk.ru (localhost [127.0.0.1])
	by fdu4.antar.bryansk.ru (8.14.4/8.14.4) with ESMTP id qA78Lxdf002514
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 7 Nov 2012 12:21:59 +0400 (MSX)
	(envelope-from fduch@fdu4.antar.bryansk.ru)
Received: (from fduch@localhost)
	by fdu4.antar.bryansk.ru (8.14.4/8.14.4/Submit) id qA78LwpK002513;
	Wed, 7 Nov 2012 12:21:58 +0400 (MSX)
	(envelope-from fduch)
Message-Id: <201211070821.qA78LwpK002513@fdu4.antar.bryansk.ru>
Date: Wed, 7 Nov 2012 12:21:58 +0400 (MSX)
From: "Alexander M. Pravkin" <fduch@antar.bryansk.ru>
Reply-To: "Alexander M. Pravkin" <fduch@antar.bryansk.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [ata] lost WDC hard drive on ICH5 after upgrade
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         173468
>Category:       kern
>Synopsis:       [ata] lost WDC hard drive on ICH5 after upgrade [regression]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mav
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 08 08:40:00 UTC 2012
>Closed-Date:    
>Last-Modified:  Mon Nov 26 21:00:01 UTC 2012
>Originator:     User &
>Release:        FreeBSD 8.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD fdu4.antar.bryansk.ru 8.3-STABLE FreeBSD 8.3-STABLE #10: Wed Nov 7 10:41:10 MSK 2012 root@fdu4.antar.bryansk.ru:/usr/obj/usr/src/sys/KERNEL i386


	
>Description:
After an upgrade from 8.2-STABLE Sat Feb 26 14:47:49 MSK 2011, kernel failed to locate one of my hard disks (ad6) on an Intel ICH5 controller. Other attached disks are fine.

diff between `egrep 'atapci1|ata3|ad6'` on dmesg's before and after upgrade:
--- dmesg-verbose-8.2-ata3.log  2012-11-07 11:33:43.000000000 +0400
+++ dmesg-verbose-8.3-ata3.log  2012-11-07 11:33:50.000000000 +0400
@@ -2,28 +2,20 @@ atapci1: <Intel ICH5 SATA150 controller>
 atapci1: Reserved 0x10 bytes for rid 0x20 type 4 at 0xdc00
 atapci1: [MPSAFE]
 atapci1: [ITHREAD]
-ata2: <ATA channel 0> on atapci1
+ata2: <ATA channel> at channel 0 on atapci1
 atapci1: Reserved 0x8 bytes for rid 0x10 type 4 at 0xec00
 atapci1: Reserved 0x4 bytes for rid 0x14 type 4 at 0xe800
-ata3: <ATA channel 1> on atapci1
+ata3: <ATA channel> at channel 1 on atapci1
 atapci1: Reserved 0x8 bytes for rid 0x18 type 4 at 0xe400
 atapci1: Reserved 0x4 bytes for rid 0x1c type 4 at 0xe000
+ata3: SATA reset: ports status=0x02
 ata3: p0: SATA connect time=0ms status=00000113
 ata3: reset tp1 mask=01 ostat0=80 ostat1=00
 ata3: stat0=0x50 err=0x01 lsb=0x3c msb=0xc3
-ata3: reset tp2 stat0=50 stat1=00 devices=0x1
+ata3: reset tp2 stat0=50 stat1=00 devices=0x0
 ata3: [MPSAFE]
 ata3: [ITHREAD]
-ata3: Identifying devices: 00000001
-ata3: New devices: 00000001
-ata3-master: pio=PIO4 wdma=WDMA2 udma=UDMA133 cable=40 wire
-ad6: setting UDMA100
-ad6: 238475MB <WDC WD2500AAJS-62B4A0 03.03A01> at ata3-master UDMA100 SATA 1.5Gb/s
-ad6: 488397168 sectors [484521C/16H/63S] 16 sectors/interrupt 1 depth queue
-GEOM: new disk ad6
-ad6: Intel check1 failed
-ad6: Adaptec check1 failed
-ad6: LSI (v3) check1 failed
-ad6: LSI (v2) check1 failed
-ad6: FreeBSD check1 failed
+ata3: Identifying devices: 00000000
+ata3: New devices: 00000000
 Trying to mount root from ufs:/dev/ad6s1a
+vfs.root.mountfrom=ufs:/dev/ad6s1a

Probably it's the same problem as in http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/159511

>How-To-Repeat:
	
>Fix:

Looks like problem appeared after this commit:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/ata/ata-lowlevel.c.diff?r1=1.84.2.8;r2=1.84.2.9

After rolling src/sys/dev/ata back to 2011-05-25 and rebuilding kernel, ad6 is fine again.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mav 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Thu Nov 8 23:21:57 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173468 

From: Alexander Motin <mav@FreeBSD.org>
To: bug-followup@FreeBSD.org, fduch@antar.bryansk.ru
Cc:  
Subject: Re: kern/173468: [ata] lost WDC hard drive on ICH5 after upgrade
 [regression]
Date: Mon, 26 Nov 2012 22:50:16 +0200

 Hi.
 
 Your guess about commit causing this looks realistic. But I don't see 
 problem in it. As I understand, the problem is either with the device or 
 the controller reporting strange values instead of device signature. 
 Respecting that this commit has its purpose and this is the only issue 
 for almost a year I am not sure we should just revert it.
 
 Could you try to boot from FreeBSD 9.1-RC3 install image with enabled 
 verbose messages to see whether disk will be detected there and how?
 
 -- 
 Alexander Motin
>Unformatted:
