summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2012-06-28 10:23:22 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2012-06-28 10:23:22 +0000
commit6916e94ace00321f29a2eccd3c6df8591e1d7cf8 (patch)
treec57b233df24d5f0bfbb92f9f14a35684de8fa668
parentbf7a01dae4c274a136de5c31bb49bb8ce81dff45 (diff)
Fix issues with AMD chipset ahci(4) attach functions.
from Brad, ok jmatthew mikeb. - Have the SB700 attach routine properly call the IDE to AHCI function and migrate the ATI_SBX00_SATA_1 PCI id to using the SB700 attach routine. The SB600 routine was being used because it does the proper call. This just makes it so all of the SB700 controllers use the same attach routine, especially incase any other workarounds/errata type things come up or not setting SB600 things for SB700. - Have the Hudson-2 attach routine set the AHCI_F_IPMS_PROBE flag to resolve the issue with Port Multiplier support. The SB700 attachment function was being used because it was setting the flag. This also fixes the other Hudson-2 AHCI controllers so they won't experience the same issue.
-rw-r--r--sys/dev/pci/ahci.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index a85411d1778..fe5ebccc4c6 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.189 2012/06/05 03:36:37 jmatthew Exp $ */
+/* $OpenBSD: ahci.c,v 1.190 2012/06/28 10:23:21 sthen Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -464,7 +464,7 @@ static const struct ahci_device ahci_devices[] = {
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON2_SATA_1,
NULL, ahci_amd_hudson2_attach },
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON2_SATA_2,
- NULL, ahci_ati_sb700_attach },
+ NULL, ahci_amd_hudson2_attach },
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON2_SATA_3,
NULL, ahci_amd_hudson2_attach },
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON2_SATA_4,
@@ -477,7 +477,7 @@ static const struct ahci_device ahci_devices[] = {
{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA,
NULL, ahci_ati_sb600_attach },
{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_1,
- NULL, ahci_ati_sb600_attach },
+ NULL, ahci_ati_sb700_attach },
{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_2,
NULL, ahci_ati_sb700_attach },
{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SBX00_SATA_3,
@@ -733,7 +733,10 @@ ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
int
ahci_ati_sb700_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
{
+ ahci_ati_sb_idetoahci(sc, pa);
+
sc->sc_flags |= AHCI_F_IPMS_PROBE;
+
return (0);
}
@@ -742,6 +745,8 @@ ahci_amd_hudson2_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
{
ahci_ati_sb_idetoahci(sc, pa);
+ sc->sc_flags |= AHCI_F_IPMS_PROBE;
+
return (0);
}