From owner-freebsd-bugs@FreeBSD.ORG Mon Nov 19 19:50:02 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 EE67E16A41B for ; Mon, 19 Nov 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 D927313C457 for ; Mon, 19 Nov 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 lAJJo1Fv065950 for ; Mon, 19 Nov 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 lAJJo1XT065949; Mon, 19 Nov 2007 19:50:01 GMT (envelope-from gnats) Resent-Date: Mon, 19 Nov 2007 19:50:01 GMT Resent-Message-Id: <200711191950.lAJJo1XT065949@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, Ed Schouten Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA62A16A469 for ; Mon, 19 Nov 2007 19:42:39 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id BC54913C448 for ; Mon, 19 Nov 2007 19:42:39 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 27A3F1CCC6; Mon, 19 Nov 2007 20:42:39 +0100 (CET) Message-Id: <20071119194239.27A3F1CCC6@palm.hoeg.nl> Date: Mon, 19 Nov 2007 20:42:39 +0100 (CET) From: Ed Schouten To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/118135: [Patch] ATA: Detect ATA controllers in MacBook3,1 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Schouten List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2007 19:50:02 -0000 >Number: 118135 >Category: kern >Synopsis: [Patch] ATA: Detect ATA controllers in MacBook3,1 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Nov 19 19:50:01 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Ed Schouten >Release: FreeBSD 6.3-PRERELEASE i386 >Organization: >Environment: System: FreeBSD mekker.fxq.nl 8.0-CURRENT FreeBSD 8.0-CURRENT #1: Mon Nov 19 20:18:07 CET 2007 root@mekker.fxq.nl:/usr/obj/usr/src/sys/MEKKER amd64 >Description: Yesterday I made a dual-boot install from my new Apple MacBook3,1 (the ones that have been released last month). Because the FreeBSD ATA code doesn't yet know the device ID's from the ATA chipsets, it shows that the devices are using UDMA33, while they can do better. According to various sources (Linux kernel mailing list, etc), I discovered that only one of them is using SATA (the one used by the harddisk) and that one doesn't use AHCI. My guess is that the ATA controller uses UDMA5 or 6. Just to be safe, I selected 5, but someone else can probably solve this question better. >How-To-Repeat: >Fix: This patch: --- src/sys/dev/ata/ata-chipset.c 2007-11-19 20:10:24.000000000 +0100 +++ src/sys/dev/ata/ata-chipset.c 2007-11-19 20:34:51.000000000 +0100 @@ -1788,8 +1788,10 @@ { ATA_I82801HB_R1, 0, AHCI, 0x00, ATA_SA300, "ICH8" }, { ATA_I82801HB_AH4, 0, AHCI, 0x00, ATA_SA300, "ICH8" }, { ATA_I82801HB_AH6, 0, AHCI, 0x00, ATA_SA300, "ICH8" }, - { ATA_I82801HBM_S1, 0, AHCI, 0x00, ATA_SA300, "ICH8M" }, + { ATA_I82801HBM_S1, 0, 0, 0x00, ATA_SA150, "ICH8M" }, { ATA_I82801HBM_S2, 0, AHCI, 0x00, ATA_SA300, "ICH8M" }, + { ATA_I82801HBM_S3, 0, AHCI, 0x00, ATA_SA300, "ICH8M" }, + { ATA_I82801HBM, 0, 0, 0x00, ATA_UDMA5, "ICH8M" }, { ATA_I82801IB_S1, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, { ATA_I82801IB_S2, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, { ATA_I82801IB_AH2, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, --- src/sys/dev/ata/ata-pci.h 2007-11-19 20:10:24.000000000 +0100 +++ src/sys/dev/ata/ata-pci.h 2007-11-19 20:34:51.000000000 +0100 @@ -168,8 +168,10 @@ #define ATA_I82801HB_R1 0x28228086 #define ATA_I82801HB_AH4 0x28248086 #define ATA_I82801HB_S2 0x28258086 -#define ATA_I82801HBM_S1 0x28298086 -#define ATA_I82801HBM_S2 0x282a8086 +#define ATA_I82801HBM_S1 0x28288086 +#define ATA_I82801HBM_S2 0x28298086 +#define ATA_I82801HBM_S3 0x282a8086 +#define ATA_I82801HBM 0x28508086 #define ATA_I82801IB_S1 0x29208086 #define ATA_I82801IB_AH2 0x29218086 #define ATA_I82801IB_AH6 0x29228086 makes my ATA devices show up like this: atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x30e0-0x30ef irq 21 at device 31.1 on pci0 ata0: on atapci0 ata1: on atapci0 atapci1: port 0x30f8-0x30ff,0x311c-0x311f,0x30f0-0x30f7,0x3118-0x311b,0x3020-0x302f,0x4000-0x400f irq 18 at device 31.2 on pci0 ata2: on atapci1 ata3: on atapci1 acd0: DVDR at ata0-master UDMA66 ad0: 238475MB at ata2-master SATA150 >Release-Note: >Audit-Trail: >Unformatted: