From avg@cybervisiontech.com.ua  Sat Mar 17 16:49:26 2007
Return-Path: <avg@cybervisiontech.com.ua>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 11C7416A405
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 Mar 2007 16:49:26 +0000 (UTC)
	(envelope-from avg@cybervisiontech.com.ua)
Received: from gateway.cybervisiontech.com.ua (gateway.cybervisiontech.com.ua [88.81.251.18])
	by mx1.freebsd.org (Postfix) with ESMTP id C9FC213C48C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 Mar 2007 16:49:24 +0000 (UTC)
	(envelope-from avg@cybervisiontech.com.ua)
Received: from localhost (hq.cybervisiontech.com [127.0.0.1])
	by zeus.cv-nj.com (Postfix) with ESMTP id 538E2CBC0D
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 16 Mar 2007 17:50:17 +0200 (EET)
Received: from zeus.cv-nj.com ([127.0.0.1])
	by localhost (hq.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id FLxLQIgCUFpr for <FreeBSD-gnats-submit@freebsd.org>;
	Fri, 16 Mar 2007 17:50:11 +0200 (EET)
Received: from rein.cybervisiontech.com.ua (rein.cybervisiontech.com.ua [10.2.1.87])
	by zeus.cv-nj.com (Postfix) with ESMTP id AE439CBC0A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 16 Mar 2007 17:50:11 +0200 (EET)
Received: from rein.cybervisiontech.com.ua (localhost [127.0.0.1])
	by rein.cybervisiontech.com.ua (8.13.8/8.13.8) with ESMTP id l2GFoF3T034318
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 16 Mar 2007 17:50:15 +0200 (EET)
	(envelope-from avg@rein.cybervisiontech.com.ua)
Received: (from avg@localhost)
	by rein.cybervisiontech.com.ua (8.13.8/8.13.8/Submit) id l2GFoE6F033939;
	Fri, 16 Mar 2007 17:50:14 +0200 (EET)
	(envelope-from avg)
Message-Id: <200703161550.l2GFoE6F033939@rein.cybervisiontech.com.ua>
Date: Fri, 16 Mar 2007 17:50:14 +0200 (EET)
From: Andriy Gapon <avg@icyb.net.ua>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ata: new pci ids for nvidia mcp61/"430 mcp" chipset
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         110449
>Category:       kern
>Synopsis:       [ata] [patch] new pci ids for nvidia mcp61/"430 mcp" chipset
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 17 16:50:15 GMT 2007
>Closed-Date:    Mon Jul 23 03:38:17 GMT 2007
>Last-Modified:  Mon Jul 23 03:38:17 GMT 2007
>Originator:     Andriy Gapon
>Release:        FreeBSD 6.2-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD 6.2-RELEASE-p2 amd64

Hardware:
Motherboard is Asus M2N
Chipset is "nForce 430 MCP" which seems to mean (or be equivalent to) MCP61
ATA controllers
atapci0@pci0:6:0:       class=0x01018a card=0x82341043 chip=0x03ec10de rev=0xa2 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    class    = mass storage
    subclass = ATA
atapci1@pci0:8:0:       class=0x010185 card=0x82341043 chip=0x03f610de rev=0xa2 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    class    = mass storage
    subclass = ATA
atapci2@pci0:8:1:       class=0x010185 card=0x82341043 chip=0x03f610de rev=0xa2 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    class    = mass storage
    subclass = ATA

>Description:
None of the ATA devices (03ec and 03f6) is recognized specificly, so all of them are being
handled in a generic way by our ATA driver. All disks show up as UDMA33.

After applying the attached patch I get the following (from verbose dmesg):
Mar 14 18:54:19 rein kernel: atapci0: <nVidia nForce MCP61 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at devi
ce 6.0 on pci0
Mar 14 18:54:19 rein kernel: atapci1: <nVidia nForce MCP61 SATA300 controller> port 0xe400-0xe407,0xe080-0xe083,0xe000-0xe007,0xdc00-0xdc03,0
xd880-0xd88f mem 0xddefc000-0xddefcfff irq 21 at device 8.0 on pci0
Mar 14 18:54:19 rein kernel: atapci2: <nVidia nForce MCP61 SATA300 controller> port 0xd800-0xd807,0xd480-0xd483,0xd400-0xd407,0xd080-0xd083,0
xd000-0xd00f mem 0xddef3000-0xddef3fff irq 22 at device 8.1 on pci0
Mar 14 18:54:19 rein kernel: ata2-master: pio=PIO4 wdma=WDMA2 udma=UDMA133 cable=40 wire
Mar 14 18:54:19 rein kernel: ad4: 286168MB <WDC WD3000JS-19PDB0 21.00M21> at ata2-master SATA300
Mar 14 18:54:19 rein kernel: ad4: 586072368 sectors [581421C/16H/63S] 16 sectors/interrupt 1 depth queue

The system is stable and performs up to the specs.

I've also noticed a post from couple of months ago with an identical patch:
http://lists.freebsd.org/pipermail/freebsd-current/2007-January/068852.html

>How-To-Repeat:
	
>Fix:

	

--- ata.diff begins here ---
--- sys/dev/ata/ata-chipset.c	Mon Oct  9 19:01:35 2006
+++ sys/dev/ata/ata-chipset.c	Mon Mar 12 17:09:38 2007
@@ -2828,6 +2828,8 @@ ata_nvidia_ident(device_t dev)
      { ATA_NFORCE_MCP55,    0, AMDNVIDIA, NVIDIA,  ATA_UDMA6, "nForce MCP55" },
      { ATA_NFORCE_MCP55_S1, 0, 0,         NV4|NVQ, ATA_SA300, "nForce MCP55" },
      { ATA_NFORCE_MCP55_S2, 0, 0,         NV4|NVQ, ATA_SA300, "nForce MCP55" },
+     { ATA_NFORCE_MCP61,    0, AMDNVIDIA, NVIDIA,  ATA_UDMA6, "nForce MCP61" },
+     { ATA_NFORCE_MCP61_S2, 0, 0,         NV4|NVQ, ATA_SA300, "nForce MCP61" },
      { 0, 0, 0, 0, 0, 0}} ;
     char buffer[64] ;
 
--- sys/dev/ata/ata-pci.h	Sat Sep 30 17:51:49 2006
+++ sys/dev/ata/ata-pci.h	Mon Mar 12 17:09:38 2007
@@ -216,6 +216,8 @@ struct ata_connect_task {
 #define ATA_NFORCE_MCP55        0x036e10de
 #define ATA_NFORCE_MCP55_S1     0x037e10de
 #define ATA_NFORCE_MCP55_S2     0x037f10de
+#define ATA_NFORCE_MCP61        0x03ec10de
+#define ATA_NFORCE_MCP61_S2     0x03f610de
 
 #define ATA_PROMISE_ID          0x105a
 #define ATA_PDC20246            0x4d33105a
--- ata.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->sos 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Mar 17 20:40:17 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer. 

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

From: Ed Schouten <ed@fxq.nl>
To: bug-followup@FreeBSD.org, avg@icyb.net.ua
Cc:  
Subject: Re: kern/110449: [ata] [patch] new pci ids for nvidia mcp61/"430
	mcp" chipset
Date: Sun, 24 Jun 2007 23:00:40 +0200

 --e9pZk6dkd7RNnQPj
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Hello,
 
 Is there any news on when this is going to be committed? FreeBSD is
 really lagging behind on this:
 
 	http://bsdmall.com/op40pdueno1s.html
 	The pciide(4) driver supporting newer chipsets, such as: [...] NVIDIA MCP6=
 1 SATA, MCP65 SATA
 
 It would be a real shame when it's not included in 7.0. That classmate I
 mentioned in the mailing list thread is using this patch for almost half
 a year now without any problems.
 
 --=20
  Ed Schouten <ed@fxq.nl>
  WWW: http://g-rave.nl/
 
 --e9pZk6dkd7RNnQPj
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.7 (FreeBSD)
 
 iD8DBQFGftt452SDGA2eCwURAvQxAJ98X6qvDWMVd27XYGS2aThOceLVxQCeKW99
 XEcEozmonnNQx9WTGNN+9Cc=
 =gKcP
 -----END PGP SIGNATURE-----
 
 --e9pZk6dkd7RNnQPj--
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Wed Jun 27 12:06:50 UTC 2007 
State-Changed-Why:  
This patch appears to be a strict subset of the one in kern/108830, 
with the exception of a different value for ATA_NFORCE_MCP61_S2. 
Can you try the patch from that one and see if it works as well for you? 
It would be even better if you can include a before-and-after dmesg 
comparison from your system. 


Responsible-Changed-From-To: sos->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jun 27 12:06:50 UTC 2007 
Responsible-Changed-Why:  
Track for now. 

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

From: linimon@lonesome.com (Mark Linimon)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/110449: [ata] [patch] new pci ids for nvidia mcp61/"430 mcp" chipset
Date: Wed, 27 Jun 2007 17:34:50 -0500

 ----- Forwarded message from Sren Schmidt <sos@deepcore.dk> -----
 
 I have already committed all the new nVidia id's to -current...
 
 For a real test use current, or copy /sys/dev/ata/* from current to releng_6
 
 -Sren
 
 ----- End forwarded message -----
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Jul 23 03:37:19 UTC 2007 
State-Changed-Why:  
See kern/108830, which has a fuller patch. 

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