From owner-freebsd-bugs@FreeBSD.ORG Fri Jun 25 11:00:44 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05E2516A4CE for ; Fri, 25 Jun 2004 11:00:43 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C57CF43D60 for ; Fri, 25 Jun 2004 11:00:43 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i5PB0YM0043926 for ; Fri, 25 Jun 2004 11:00:34 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i5PB0YX2043919; Fri, 25 Jun 2004 11:00:34 GMT (envelope-from gnats) Resent-Date: Fri, 25 Jun 2004 11:00:34 GMT Resent-Message-Id: <200406251100.i5PB0YX2043919@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, Rene de Vries Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38BB816A574 for ; Fri, 25 Jun 2004 10:52:31 +0000 (GMT) Received: from bastix.tunix.nl (bastix.tunix.nl [193.79.201.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 918C943D1F for ; Fri, 25 Jun 2004 10:52:29 +0000 (GMT) (envelope-from rene@tunix.nl) Received: (from root@localhost) by bastix.tunix.nl (8.9.3c/8.6.12) id MAA99805 for ; Fri, 25 Jun 2004 12:52:15 +0200 (CEST) Received: by bastix.tunix.nl (TUNIX txp2/smap) for id sma098796; Fri, 25 Jun 04 12:50:34 +0200 Received: from upsilix.tunix.nl (upsilix.tunix.nl [172.16.2.22]) by fix.tunix.nl (8.10.2+Sun/8.10.2) with ESMTP id i5PAoYo29276 for ; Fri, 25 Jun 2004 12:50:34 +0200 (MEST) Received: from upsilix.tunix.nl (localhost.tunix.nl [127.0.0.1]) by upsilix.tunix.nl (8.12.8p2/8.12.6) with ESMTP id i5PAoYD2063364 for ; Fri, 25 Jun 2004 12:50:34 +0200 (CEST) (envelope-from rene@upsilix.tunix.nl) Received: (from rene@localhost) by upsilix.tunix.nl (8.12.8p2/8.12.6/Submit) id i5PAoYAg063363; Fri, 25 Jun 2004 12:50:34 +0200 (CEST) (envelope-from rene) Message-Id: <200406251050.i5PAoYAg063363@upsilix.tunix.nl> Date: Fri, 25 Jun 2004 12:50:34 +0200 (CEST) From: Rene de Vries To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/68316: support for intel ICH5 SATA/IDE controller X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Rene de Vries List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2004 11:00:44 -0000 >Number: 68316 >Category: kern >Synopsis: support for intel ICH5 SATA/IDE controller >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jun 25 11:00:34 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Rene de Vries >Release: FreeBSD 4.8 i386 >Organization: Tunix Internet Security & Training >Environment: System: FreeBSD upsilix.tunix.nl 4.8 FreeBSD 4.8-RELEASE-p16 #7: Wed Mar 3 15:00:31 CET 2004 rene@upsilix.tunix.nl:/usr/obj/usr/src/sys/UPSILIX i386 >Description: The Intel SE7210TP1 motherboard contains a new controller, pci id's were added. Futhermore, disable cable check for SATA disks; assume SATA is always UDMA100. Index: sys/dev/ata/ata-dma.c =================================================================== RCS file: sys/dev/ata/ata-dma.c,v retrieving revision 1.1.1.5 retrieving revision 1.2 diff -u -r1.1.1.5 -r1.2 --- sys/dev/ata/ata-dma.c 2002/10/15 10:21:38 1.1.1.5 +++ sys/dev/ata/ata-dma.c 2004/06/07 09:42:27 1.2 @@ -104,13 +104,21 @@ ch->alignment = 0x1; #if 1 + if ((ch->chiptype != 0x24188086) && (ch->chiptype != 0x25a38086)) { + /* Only for non-SATA */ if (udmamode > 2 && !ch->device[ATA_DEV(device)].param->hwres_cblid) { ata_prtdev(atadev,"DMA limited to UDMA33, non-ATA66 cable or device\n"); udmamode = 2; } + } #endif switch (ch->chiptype) { + case 0x24db8086: /* Intel ICH5 */ + case 0x25a28086: + case 0x24188086: /* Intel ICH5 SATA */ + case 0x25a38086: + case 0x24ca8086: /* Intel ICH4 mobile */ case 0x24cb8086: /* Intel ICH4 */ case 0x248a8086: /* Intel ICH3 mobile */ case 0x248b8086: /* Intel ICH3 */ Index: sys/dev/ata/ata-pci.c =================================================================== RCS file: /usr/local/cvs/cvsroot/fw/os/freebsd/sys/dev/ata/ata-pci.c,v retrieving revision 1.1.1.3 retrieving revision 1.2 diff -u -r1.1.1.3 -r1.2 --- sys/dev/ata/ata-pci.c 2002/10/15 10:21:38 1.1.1.3 +++ sys/dev/ata/ata-pci.c 2004/06/07 09:42:27 1.2 @@ -146,9 +146,18 @@ case 0x248b8086: return "Intel ICH3 ATA100 controller"; + case 0x24ca8086: case 0x24cb8086: return "Intel ICH4 ATA100 controller"; + case 0x25a38086: + case 0x24d18086: + return "Intel ICH5 SATA150 controller"; + + case 0x25a28086: + case 0x24db8086: + return "Intel ICH5 ATA100 controller"; + case 0x522910b9: if (pci_get_revid(dev) >= 0xc4) return "AcerLabs Aladdin ATA100 controller"; @@ -593,6 +602,17 @@ if (!(ATA_INB(ch->r_bmio, ATA_BMDEVSPEC_1) & 0x20)) return 1; break; + + case 0x25a38086: + case 0x24d18086: /* Intel ICH5 SATA150 */ + dmastat = ATA_INB(ch->r_bmio, ATA_BMSTAT_PORT); + if ((dmastat & (ATA_BMSTAT_ACTIVE | ATA_BMSTAT_INTERRUPT)) != + ATA_BMSTAT_INTERRUPT) + return 1; + ATA_OUTB(ch->r_bmio, ATA_BMSTAT_PORT, dmastat & + ~(ATA_BMSTAT_DMA_SIMPLEX | ATA_BMSTAT_ERROR)); + DELAY(1); + return 0; } if (ch->flags & ATA_DMA_ACTIVE) { >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: