The following diff fixes a couple of small issues with the AMD chipset
attach functions..

- 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.


Index: ahci.c
===================================================================
RCS file: /home/cvs/src/sys/dev/pci/ahci.c,v
retrieving revision 1.188
diff -u -p -r1.188 ahci.c
--- ahci.c      5 May 2012 10:10:12 -0000       1.188
+++ ahci.c      6 May 2012 03:46:01 -0000
@@ -463,7 +463,7 @@ static const struct ahci_device ahci_dev
        { 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,
@@ -476,7 +476,7 @@ static const struct ahci_device ahci_dev
        { 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,
@@ -732,7 +732,10 @@ ahci_ati_sb600_attach(struct ahci_softc 
 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);
 }
 
@@ -740,6 +743,8 @@ int
 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);
 }

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to