From owner-freebsd-stable@FreeBSD.ORG Wed May 23 19:56:55 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F3BA16A476; Wed, 23 May 2007 19:56:55 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id CDAB113C484; Wed, 23 May 2007 19:56:54 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 597A2221045; Wed, 23 May 2007 15:56:54 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Wed, 23 May 2007 15:56:54 -0400 X-Sasl-enc: MIJhU6f+M8pjNC08aE51aq5YxfsgUstD5MV66tUO+bGc 1179950213 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id 6813DAF80; Wed, 23 May 2007 15:56:53 -0400 (EDT) Message-ID: <46549C83.6080506@incunabulum.net> Date: Wed, 23 May 2007 20:56:51 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: "Bruce M. Simpson" References: <46535A83.5050207@incunabulum.net> <200705231108.44939.doconnor@gsoft.com.au> <4653AB59.2020702@incunabulum.net> <200705231245.06577.doconnor@gsoft.com.au> <46546D8F.4040100@incunabulum.net> <465487E7.7010509@incunabulum.net> In-Reply-To: <465487E7.7010509@incunabulum.net> Content-Type: multipart/mixed; boundary="------------060401090909090208090903" Cc: scottl@FreeBSD.org, freebsd-stable@freebsd.org, sos@FreeBSD.org Subject: Re: AcerLabs/ULi SATA woes X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 19:56:55 -0000 This is a multi-part message in MIME format. --------------060401090909090208090903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Just for reference: Soren has gotten back to me about this and has a patch pending. In the meantime here is the style(9)-ified patch from Sven which I am currently using (in 6.2-STABLE, CURRENT , and p4 branches). Regards, BMS --------------060401090909090208090903 Content-Type: text/plain; name="ata-uli5287-workaround.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ata-uli5287-workaround.patch" --- ata-chipset.c.orig Wed May 23 17:59:28 2007 +++ ata-chipset.c Wed May 23 18:00:44 2007 @@ -952,7 +952,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_5288, 0x00, 4, ALIAHCI, 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,16 +984,19 @@ switch (ctlr->chip->cfg2) { case ALISATA: + case ALIAHCI: ctlr->channels = ctlr->chip->cfg1; ctlr->allocate = ata_ali_sata_allocate; ctlr->setmode = ata_sata_setmode; /* if we have a memory resource we can likely do AHCI */ - 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); + if (ctlr->chip->cfg2 == ALIAHCI) { + 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, --- ata-pci.h.orig Wed May 23 18:00:53 2007 +++ ata-pci.h Wed May 23 18:01:02 2007 @@ -360,6 +360,7 @@ #define ALIOLD 0x01 #define ALINEW 0x02 #define ALISATA 0x04 +#define ALIAHCI 0x08 #define HPT366 0 #define HPT370 1 --------------060401090909090208090903--