From owner-freebsd-bugs@FreeBSD.ORG Sun Oct 14 19:50:01 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D36D616A419 for ; Sun, 14 Oct 2007 19:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A432813C468 for ; Sun, 14 Oct 2007 19:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9EJo1v8022840 for ; Sun, 14 Oct 2007 19:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9EJo1i8022839; Sun, 14 Oct 2007 19:50:01 GMT (envelope-from gnats) Resent-Date: Sun, 14 Oct 2007 19:50:01 GMT Resent-Message-Id: <200710141950.l9EJo1i8022839@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrew Azarov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E123316A41A for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/117190: [patch] Support ATA ICH7 controller (SATA150 mode only) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2007 19:50:02 -0000 >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: