summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2012-06-28 10:23:21 +0000
committersthen <sthen@openbsd.org>2012-06-28 10:23:21 +0000
commitd1728b94e6598ecc0b2f48d5a040db92c0fa768c (patch)
treeea75912bdcb1ccc9f3a1ac23c178af2e2b0487b1
parentlibrthread has eaten libpthread, so build includes via the former instead (diff)
downloadwireguard-openbsd-d1728b94e6598ecc0b2f48d5a040db92c0fa768c.tar.xz
wireguard-openbsd-d1728b94e6598ecc0b2f48d5a040db92c0fa768c.zip
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);
}