From owner-freebsd-bugs@FreeBSD.ORG Sat Sep 23 22:20:13 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org 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 2ADC116A403 for ; Sat, 23 Sep 2006 22:20:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75CD143D45 for ; Sat, 23 Sep 2006 22:20:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k8NMKCsh070665 for ; Sat, 23 Sep 2006 22:20:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8NMKBZ3070659; Sat, 23 Sep 2006 22:20:11 GMT (envelope-from gnats) Resent-Date: Sat, 23 Sep 2006 22:20:11 GMT Resent-Message-Id: <200609232220.k8NMKBZ3070659@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, Sven Petai Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 348D016A403 for ; Sat, 23 Sep 2006 22:15:18 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03EBE43D55 for ; Sat, 23 Sep 2006 22:15:18 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k8NMFHcT030883 for ; Sat, 23 Sep 2006 22:15:17 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k8NMFHSH030882; Sat, 23 Sep 2006 22:15:17 GMT (envelope-from nobody) Message-Id: <200609232215.k8NMFHSH030882@www.freebsd.org> Date: Sat, 23 Sep 2006 22:15:17 GMT From: Sven Petai To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/103534: [ata] [patch] support for ALI 5288 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: Sat, 23 Sep 2006 22:20:13 -0000 >Number: 103534 >Category: kern >Synopsis: [ata] [patch] support for ALI 5288 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 23 22:20:11 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Sven Petai >Release: current (23.09.2006) >Organization: NPO BSD Estonia >Environment: FreeBSD 7.0-CURRENT FreeBSD 7.0-CURRENT #33: Sat Sep 23 22:19:06 EEST 2006 root@:/usr/obj/usr/src/sys/DEPRESSION64 amd64 >Description: ALI (ULI) 5288 ata chipset is not supported, machine will not find any disks when IDE type is set to RAID (the default) or AHCI in the BIOS. It will find the disks in UDMA33 mode when non-RAID type is selected from BIOS. With the above patch disks are recognized as SATA 150 capable devices in all 3 BIOS modes. PS. this chip can be found on ASROCK 939SLI32-eSATA2 motherboard. >How-To-Repeat: >Fix: --- sys-orig/dev/ata/ata-chipset.c Sat Sep 23 19:09:32 2006 +++ sys/dev/ata/ata-chipset.c Sat Sep 23 22:42:58 2006 @@ -950,6 +950,7 @@ struct ata_chip_id *idx; static struct ata_chip_id ids[] = {{ ATA_ALI_5289, 0x00, 2, ALISATA, ATA_SA150, "M5289" }, + { ATA_ALI_5288, 0x00, 4, ALISATA, ATA_SA300, "M5288" }, { ATA_ALI_5287, 0x00, 4, ALISATA, ATA_SA150, "M5287" }, { ATA_ALI_5281, 0x00, 2, ALISATA, ATA_SA150, "M5281" }, { ATA_ALI_5229, 0xc5, 0, ALINEW, ATA_UDMA6, "M5229" }, @@ -984,6 +985,12 @@ ctlr->channels = ctlr->chip->cfg1; ctlr->allocate = ata_ali_sata_allocate; ctlr->setmode = ata_sata_setmode; + ctlr->r_type2 = SYS_RES_MEMORY; + ctlr->r_rid2 = PCIR_BAR(5); + + if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2, + &ctlr->r_rid2, RF_ACTIVE))) + return ata_ahci_chipinit(dev); /* enable PCI interrupt */ pci_write_config(dev, PCIR_COMMAND, >Release-Note: >Audit-Trail: >Unformatted: