Date: Wed, 23 May 2007 20:56:51 +0100 From: "Bruce M. Simpson" <bms@incunabulum.net> To: "Bruce M. Simpson" <bms@incunabulum.net> Cc: scottl@FreeBSD.org, freebsd-stable@freebsd.org, sos@FreeBSD.org Subject: Re: AcerLabs/ULi SATA woes Message-ID: <46549C83.6080506@incunabulum.net> In-Reply-To: <465487E7.7010509@incunabulum.net> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46549C83.6080506>