From owner-freebsd-current@FreeBSD.ORG Sun Jan 20 03:13:55 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BF7216A469; Sun, 20 Jan 2008 03:13:55 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from frontmail.ipactive.de (frontmail.maindns.de [85.214.95.103]) by mx1.freebsd.org (Postfix) with ESMTP id 765D413C478; Sun, 20 Jan 2008 03:13:53 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from mail.vtec.ipme.de (Q7cf2.q.ppp-pool.de [89.53.124.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by frontmail.ipactive.de (Postfix) with ESMTP id 6C40112883F; Sun, 20 Jan 2008 04:13:45 +0100 (CET) Received: from cesar.sz.vwsoft.com (unknown [192.168.18.33]) by mail.vtec.ipme.de (Postfix) with ESMTP id B19183F43B; Sun, 20 Jan 2008 04:12:27 +0100 (CET) Message-ID: <4792BC5E.4030703@vwsoft.com> Date: Sun, 20 Jan 2008 04:13:34 +0100 From: Volker User-Agent: Thunderbird 2.0.0.9 (X11/20080113) MIME-Version: 1.0 To: FreeBSD Stable X-Enigmail-Version: 0.95.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit MailScanner-NULL-Check: 1201403551.55055@iX4yPSzDpUr6NHYVDXgR8A X-VWSoft-MailScanner: Found to be clean X-MailScanner-From: volker@vwsoft.com X-ipactive-MailScanner-Information: Please contact the ISP for more information X-ipactive-MailScanner: Found to be clean X-ipactive-MailScanner-From: volker@vwsoft.com Cc: FreeBSD current , cokane@freebsd.org Subject: patch for review: ATI SB600 SATA AHCI X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jan 2008 03:13:55 -0000 Hi! I've done the following local changes to get the ATA controller being correctly detected and initialized as an AHCI controller on an HP 6715b notebook using ATI SB-600 chipset. With stock kernel, the ATA controller is being recognized as a generic ATA controller and devices being driven in UDMA-33 mode. With the following patch, the controller is being initialized in AHCI mode and devices being set to SATA-150/300 mode. atapci0: port 0x9000-0x9007,0x9008-0x900b,0x9010-0x9017,0x5018-0x501b,0x5020-0x502f mem 0xd0609000-0xd06093ff irq 16 at device 18.0 on pci0 atapci0: Reserved 0x10 bytes for rid 0x20 type 4 at 0x5020 atapci0: Reserved 0x400 bytes for rid 0x24 type 3 at 0xd0609000 atapci0: [MPSAFE] atapci0: [ITHREAD] atapci0: AHCI Version 01.10 controller with 4 ports detected %atacontrol mode ad4 current mode = SATA150 My patch has been tested on RELENG_7 as of 2008-01-19. Please review, check and test if possible. Should work on 8-CURRENT, too. If nobody complains until tuesday (2008-01-22), I'll file a PR for that patch. Volker --- sys/dev/ata/ata-chipset.c.orig 2008-01-20 03:22:37.000000000 +0100 +++ sys/dev/ata/ata-chipset.c 2008-01-20 03:30:03.000000000 +0100 @@ -1348,6 +1348,7 @@ { ATA_ATI_IXP400_S1, 0x00, SIIMEMIO, 0, ATA_SA150, "IXP400" }, { ATA_ATI_IXP400_S2, 0x00, SIIMEMIO, 0, ATA_SA150, "IXP400" }, { ATA_ATI_IXP600, 0x00, 0, 0, ATA_UDMA6, "IXP600" }, + { ATA_ATI_IXP600_S1, 0x00, 0, AHCI, ATA_SA300, "IXP600" }, { ATA_ATI_IXP700, 0x00, 0, 0, ATA_UDMA6, "IXP700" }, { 0, 0, 0, 0, 0, 0}}; @@ -1360,7 +1361,10 @@ if (ctlr->chip->cfg1 & SIIMEMIO) ctlr->chipinit = ata_sii_chipinit; else - ctlr->chipinit = ata_ati_chipinit; + if (ctlr->chip->cfg2 & AHCI) + ctlr->chipinit = ata_ahci_chipinit; + else + ctlr->chipinit = ata_ati_chipinit; return 0; } --- sys/dev/ata/ata-pci.h.orig 2008-01-20 03:22:28.000000000 +0100 +++ sys/dev/ata/ata-pci.h 2008-01-20 03:23:56.000000000 +0100 @@ -104,6 +104,7 @@ #define ATA_ATI_IXP400_S1 0x43791002 #define ATA_ATI_IXP400_S2 0x437a1002 #define ATA_ATI_IXP600 0x438c1002 +#define ATA_ATI_IXP600_S1 0x43801002 #define ATA_ATI_IXP700 0x439c1002 #define ATA_CENATEK_ID 0x16ca