From nobody@FreeBSD.org  Sun Oct 14 19:41:20 2007
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 E123316A41A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 14 Oct 2007 19:41:20 +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 BCE5A13C43E
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 14 Oct 2007 19:41:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9EJfEKd028798
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 14 Oct 2007 19:41:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l9EJfEMw028797;
	Sun, 14 Oct 2007 19:41:14 GMT
	(envelope-from nobody)
Message-Id: <200710141941.l9EJfEMw028797@www.freebsd.org>
Date: Sun, 14 Oct 2007 19:41:14 GMT
From: Andrew Azarov <andrew@azarov.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] Support ATA ICH7 controller (SATA150 mode only)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         117190
>Category:       kern
>Synopsis:       [ata] [patch] Support ATA ICH7 controller (SATA150 mode only)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 14 19:50:01 UTC 2007
>Closed-Date:    Thu Dec 25 21:28:45 UTC 2008
>Last-Modified:  Thu Dec 25 21:28:45 UTC 2008
>Originator:     Andrew Azarov
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
AVL Communications
>Environment:
FreeBSD 5.4-RELEASE FreeBSD 5.4-RELEASE #1
>Description:
We had a client's server hardware upgrade. The new system was built on
motherboard with ICH7 ata controller, but 5.4-RELEASE didn't know anything
about it and it used a Generic UDMA33 chip driver. However 6.2-RELEASE
sources of FreeBSD helped me to create a simple fix for this problem, and
the drives now work in SATA150 mode. The attached patch adds support for
ICH7 chipset in SATA150 mode ONLY.
>How-To-Repeat:
N/A
>Fix:


Patch attached with submission follows:

--- src/sys/dev/ata/ata-all.c       Sun Oct 14 05:55:50 2007
+++ src/sys/dev/ata/ata-all.c       Sun Oct 14 06:12:57 2007
@@ -995,6 +995,7 @@
     case ATA_UDMA5: return "UDMA100";
     case ATA_UDMA6: return "UDMA133";
     case ATA_SA150: return "SATA150";
+    case ATA_SA300: return "SATA300";
     default: return "???";
     }
 }
--- src/sys/dev/ata/ata-chipset.c       Sun Oct 14 05:55:49 2007
+++ src/sys/dev/ata/ata-chipset.c       Sun Oct 14 22:47:37 2007
@@ -838,6 +838,10 @@
      { ATA_I82801FB,   0, 0, 0x00, ATA_UDMA5, "Intel ICH6" },
      { ATA_I82801FB_S1,0, 0, 0x00, ATA_SA150, "Intel ICH6" },
      { ATA_I82801FB_R1,0, 0, 0x00, ATA_SA150, "Intel ICH6" },
+     { ATA_I82801GB,   0, 0, 0x00, ATA_UDMA5, "Intel ICH7" },
+     { ATA_I82801GB_S1,0, 0, 0x00, ATA_SA300, "Intel ICH7" },
+     { ATA_I82801GB_R1,0, 0, 0x00, ATA_SA300, "Intel ICH7" },
+     { ATA_I82801GB_AH,0, 0, 0x00, ATA_SA300, "Intel ICH7" },
      { 0, 0, 0, 0, 0, 0}};
     char buffer[64]; 
 
@@ -924,7 +928,10 @@
 
     /* ICH6 has 4 SATA ports as master/slave on 2 channels so deal with pairs */
     if (ctlr->chip->chipid == ATA_I82801FB_S1 ||
-       ctlr->chip->chipid == ATA_I82801FB_R1) {
+       ctlr->chip->chipid == ATA_I82801FB_R1 ||
+       ctlr->chip->chipid == ATA_I82801GB_S1 ||
+       ctlr->chip->chipid == ATA_I82801GB_R1 ||
+       ctlr->chip->chipid == ATA_I82801GB_AH ) {
        mask = (0x0005 << ch->unit);
     }
     else {
--- src/sys/dev/ata/ata-pci.h       Sun Oct 14 05:55:50 2007
+++ src/sys/dev/ata/ata-pci.h       Sun Oct 14 06:01:07 2007
@@ -127,6 +127,10 @@
 #define ATA_I82801FB           0x266f8086
 #define ATA_I82801FB_S1                0x26518086
 #define ATA_I82801FB_R1                0x26528086
+#define ATA_I82801GB            0x27df8086
+#define ATA_I82801GB_S1         0x27c08086
+#define ATA_I82801GB_AH         0x27c18086
+#define ATA_I82801GB_R1         0x27c38086
 
 #define ATA_ITE_ID             0x1283
 #define ATA_IT8212F            0x82121283
--- src/sys/sys/ata.h       Sun Oct 14 22:45:07 2007
+++ src/sys/sys/ata.h       Sun Oct 14 06:19:32 2007
@@ -210,6 +210,7 @@
 #define ATA_UDMA5              0x45
 #define ATA_UDMA6              0x46
 #define ATA_SA150              0x47
+#define ATA_SA300               0x48
 #define ATA_DMA_MAX            0x4f
 
 /* ATA commands */

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: vwe 
State-Changed-When: Sat Mar 8 03:57:54 UTC 2008 
State-Changed-Why:  

this is a 5.x specific hardware support request 
5.x is getting EOL'd soon -> suspend for now 

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

From: Volker <volker@vwsoft.com>
To: bug-followup@FreeBSD.org, andrew@azarov.com
Cc:  
Subject: Re: kern/117190: [sata] [patch] Support ATA ICH7 controller (SATA150
 mode only)
Date: Sat, 08 Mar 2008 04:57:31 +0100

 Andrew,
 
 thank you for sending in your patch. Unfortunately support for the 5.x
 branch will end soon (less than 3 months) and I doubt there will be any
 new release for the 5.x branch.
 
 By not getting any more 5.x releases out, I don't think it makes sense
 to bring patches into cvs dead-end branch for supporting more hardware.
 I would like to recommend 1) maintaining the patches needed for your
 system locally, 2) updating your system to a more recent version of FreeBSD.
 
 At the time of the 5.x branch being EOL'd (May 2008), we'll closing PR
 tickets like this. For now, I'll set it suspended.
 
 Again, thank you for your submission.
State-Changed-From-To: suspended->closed  
State-Changed-By: brucec 
State-Changed-When: Thu Dec 25 21:28:09 UTC 2008 
State-Changed-Why:  
5.x has gone EOL. 

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