From owner-freebsd-current@FreeBSD.ORG Sat Oct 9 11:48:45 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2864916A4CE for ; Sat, 9 Oct 2004 11:48:45 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE59543D2D for ; Sat, 9 Oct 2004 11:48:44 +0000 (GMT) (envelope-from bletofarine@gmail.com) Received: by mproxy.gmail.com with SMTP id 74so129896rnk for ; Sat, 09 Oct 2004 04:48:44 -0700 (PDT) Received: by 10.38.152.63 with SMTP id z63mr439952rnd; Sat, 09 Oct 2004 04:48:44 -0700 (PDT) Received: by 10.38.76.50 with HTTP; Sat, 9 Oct 2004 04:48:44 -0700 (PDT) Message-ID: Date: Sat, 9 Oct 2004 13:48:44 +0200 From: Florian Le Goff To: current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: Aurelien NEPHTALI Subject: patch: udma5 support for Intel 82801FB ICH6 Ultra ATA Controller X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Florian Le Goff List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Oct 2004 11:48:45 -0000 Hi, I've got an ASUS P5GD1 [1] Motherboard, with a 915P chipset and a ICH6R [2] southbridge. Since the UDMA controller was recognized as an "GENERIC ATA controller", I was stuck in UDMA33 mode for my Seagate Ultra ATA/100 IDE hard drive, and I wasn't able to change the settings using "atacontrol mode". Since there is already a great list of Intel supported chipsets in src/sys/dev/ata/ata-chipset.c, I've added the references of the chip in ata-chipset.c and ata-pci.h, on a fresh cvsuped 6.0-CURRENT. Please, someone could review it ? My first patch :/ pciconf -lv give the following output for this chip : atapci0@pci0:31:1: class=0x01018a card=0x26408086 chip=0x266f8086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = '82801FB ICH6 Ultra ATA Storage Controller' class = mass storage subclass = ATA The Intel's datasheet is speaking of this chip as : Integrated IDE Controller -- Independent timing of up to two drives -- Ultra ATA/100/66/33, BMIDE and PIO modes -- Tri-state modes to enable swap bay So, it doesn't seem to be really different from other Intel IDE controllers. My two-lines patch : ble# pwd /usr/src/sys/dev/ata ble# diff -u ata-pci.h~ ata-pci.h --- ata-pci.h~ Wed Oct 6 23:27:39 2004 +++ ata-pci.h Sat Oct 9 11:31:10 2004 @@ -118,6 +118,7 @@ #define ATA_I82801EB 0x24db8086 #define ATA_I82801EB_S1 0x24d18086 #define ATA_I82801EB_R1 0x24df8086 +#define ATA_I82801FB 0x266f8086 #define ATA_I6300ESB 0x25a28086 #define ATA_I6300ESB_S1 0x25a38086 #define ATA_I6300ESB_R1 0x25b08086 ble# diff -u ata-chipset.c~ ata-chipset.c --- ata-chipset.c~ Wed Oct 6 23:27:39 2004 +++ ata-chipset.c Sat Oct 9 11:16:54 2004 @@ -830,6 +830,7 @@ { ATA_I82801EB, 0, 0, 0x00, ATA_UDMA5, "Intel ICH5" }, { ATA_I82801EB_S1,0, 0, 0x00, ATA_SA150, "Intel ICH5" }, { ATA_I82801EB_R1,0, 0, 0x00, ATA_SA150, "Intel ICH5" }, + { ATA_I82801FB, 0, 0, 0x00, ATA_UDMA5, "Intel ICH6" }, { ATA_I6300ESB, 0, 0, 0x00, ATA_UDMA5, "Intel 6300ESB" }, { ATA_I6300ESB_S1,0, 0, 0x00, ATA_SA150, "Intel 6300ESB" }, { ATA_I6300ESB_R1,0, 0, 0x00, ATA_SA150, "Intel 6300ESB" }, Now, when the kernel is loading, the controller is recognized (output of dmesg) : atapci0: port 0xffa0-0xffaf,0x376,0x170-0x177,0x3f 6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 And my hard drive works like a charm : ad0: 38166MB [77545/16/63] at ata0-master UDMA100 Note that there is always, on that board, another driver spotted as "GENERIC", for this chip : atapci1@pci0:31:2: class=0x01018f card=0x26011043 chip=0x26528086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = '82801FR/FRW ICH6R/ICH6RW SATA Controller' class = mass storage subclass = ATA I'll try to add it, as soon I will have a SATA-compliant drive to test it :-) [1] : http://www.asus.com/products/mb/socket775/p5gd1/overview.htm [2] : http://www.intel.com/design/chipsets/datashts/301473.htm -- Florian "madflo" Le Goff - madflo@beertech.org