misc/117190: [patch] Support ATA ICH7 controller (SATA150 mode only)

Andrew Azarov andrew at azarov.com
Sun Oct 14 12:50:02 PDT 2007


>Number:         117190
>Category:       misc
>Synopsis:       [patch] Support ATA ICH7 controller (SATA150 mode only)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 14 19:50:01 UTC 2007
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


More information about the freebsd-bugs mailing list