From nobody@FreeBSD.org  Fri Mar 14 14:33:14 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CCCF01065671
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 14 Mar 2008 14:33:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id C9F648FC1E
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 14 Mar 2008 14:33:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m2EETsBs054244
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 14 Mar 2008 14:29:54 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m2EETsdd054243;
	Fri, 14 Mar 2008 14:29:54 GMT
	(envelope-from nobody)
Message-Id: <200803141429.m2EETsdd054243@www.freebsd.org>
Date: Fri, 14 Mar 2008 14:29:54 GMT
From: "Dmitry A.Deineka" <ddeineka@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Cannot fdisk/gpt with 1TB SATA disk and 965QM Motherboard
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         121703
>Category:       kern
>Synopsis:       [ata] Cannot fdisk/gpt with 1TB SATA disk and 965QM Motherboard
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 14 14:40:00 UTC 2008
>Closed-Date:    Sat Oct 30 08:06:59 UTC 2010
>Last-Modified:  Sat Oct 30 08:06:59 UTC 2010
>Originator:     Dmitry A.Deineka
>Release:        FreeBSD 7.0-RELEASE
>Organization:
ITL
>Environment:
FreeBSD ms.itl.ua 7.0-STABLE FreeBSD 7.0-STABLE #0: Fri Mar 14 14:02:32 EET 2008     axl@ms.itl.ua:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Have Gigabyte 965QM-DS2 ver 2.x motherboard with new Western Digital <WDC WD1000FYPS-01ZKB0 02.01B01>, capacity  1TB. 

Controller present himself as:
atapci0: <Intel ATA controller> port 0xa000-0xa007,0xa400-0xa403,0xa800-0xa807,0xac00-0xac03,0xb000-0xb00f irq 18 at device 3.2 on pci0
atapci0: [ITHREAD]
atapci1: <JMicron JMB363 SATA300 controller> irq 18 at device 0.0 on pci2
atapci1: [ITHREAD]
atapci1: AHCI called from vendor specific driver
atapci1: AHCI Version 01.00 controller with 2 ports detected
atapci2: <Intel AHCI controller> port 0xd400-0xd407,0xd800-0xd803,0xdc00-0xdc07,0xe000-0xe003,0xe400-0xe41f mem 0xf0225000-0xf02257ff irq 19 at device 31.2 on pci0
atapci2: [ITHREAD]
atapci2: AHCI Version 01.10 controller with 6 ports detected


Have detected 1TB drive as 31Mb drive:
ad16: 31MB <WDC WD1000FYPS-01ZKB0 02.01B01> at ata8-master SATA300

Manual setting of correct number of cyl/hd/sectors with fdisk not successfull - I can label slice with ~950Gb size (or 10Gb - does not matter), but usable size no more that ~31Mb. Changing BIOS parameters (and turning off disk in BIOS), changing AHCI on/off etc with no luck.

Please note that semi-fresh linux (ubuntu ?) detects and works with this disk on this motherboard. Also, FreeBSD 7.0REL detects this drive well on older motherboard with ICH7.
>How-To-Repeat:
You can use motherboard  Gigabyte 965QM-DS2 or similar and WDC WD1000FYPS drive with 6.x or 7.x FreeBSD.
>Fix:
none known for me.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: vwe 
State-Changed-When: Tue Mar 18 22:53:50 UTC 2008 
State-Changed-Why:  

can you please send `atacontrol cap ad16' and a complete dmesg? 


Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Tue Mar 18 22:53:50 UTC 2008 
Responsible-Changed-Why:  

Over to maintainer. 

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


From: Volker Werth <vwe@freebsd.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/121703: [ata] Cannot fdisk/gpt with 1TB SATA disk and 965QM
 Motherboard
Date: Wed, 19 Mar 2008 17:20:42 +0100

 Now forward inline due to mailer problems on my side. According to
 submitter, the problem has been solved by installing a patchset.
 
 On 03/19/08 13:05, Dmitry Deineka wrote:
 > Problem seems to be fixed few days ago. Thanks to Andrey V. Elsukov
 > (bu7cher at yandex.ru <http://yandex.ru>).
 > 
 > verbose dmesg before fixing attached with additional patch for drive's
 > information.
 > 
 > Andrey forward to me email with patch from Søren Schmidt, patch
 > attached (I hope this patch is not for private use :)).
 > After patching and rebooting drive recognized correctly and works.
 > 
 > # cat /var/run/dmesg.boot |grep ^ad
 > adv0: not probed (disabled)
 > ad14: ORG 321670847 sectors [319117C/16H/63S]
 > ad14: NEW 321672960 sectors [319120C/16H/63S]
 > ad14: 157066MB <WDC WD1600YS-01SHB1 20.06C06> at ata7-master SATA300
 > ad14: 321672960 sectors [319120C/16H/63S] 16 sectors/interrupt 1 depth queue
 > ad14: IDENTIFY DEVICE data dump:
 > ad14: =====================================================
 > ad14: Intel check1 failed
 > ad14: Adaptec check1 failed
 > ad14: LSI (v3) check1 failed
 > ad14: LSI (v2) check1 failed
 > ad14: FreeBSD check1 failed
 > ad16: ORG 65134 sectors [64C/16H/63S]
 > ad16: NEW 1953525168 sectors [1938021C/16H/63S]
 > ad16: 953869MB <WDC WD1000FYPS-01ZKB0 02.01B01> at ata8-master SATA300
 > ad16: 1953525168 sectors [1938021C/16H/63S] 16 sectors/interrupt 1 depth
 > queue
 > 
 > 
 > Thank you all.
 > 
 > Regards,
 >   Dmitry
 
Responsible-Changed-From-To: sos->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue May 12 04:51:22 UTC 2009 
Responsible-Changed-Why:  
sos@ is not actively working on ATA-related PRs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121703 
Responsible-Changed-From-To: freebsd-bugs->jh 
Responsible-Changed-By: jh 
Responsible-Changed-When: Sun Sep 19 15:21:47 UTC 2010 
Responsible-Changed-Why:  
Does this problem still exist on 7.3 or 8.1? 

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

From: Alexander Best <arundel@freebsd.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/121703: [ata] Cannot fdisk/gpt with 1TB SATA disk and 965QM Motherboard
Date: Mon, 18 Oct 2010 21:51:31 +0000

 i'm not completely sure about it, but i believe with the introduction of
 hw.ata.setmax (support for host protected area [HPA]) this issue has been
 fixed. however i cannot verify this, because i never experienced the problems
 described in this PR in the first place.
 
 cheers.
 alex
 
 -- 
 a13x
State-Changed-From-To: feedback->closed 
State-Changed-By: jh 
State-Changed-When: Sat Oct 30 08:05:38 UTC 2010 
State-Changed-Why:  
Feedback timeout. According to Alexander Best the problem might have 
been fixed. 

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