On Tue, Oct 13, 2009 at 09:08:46PM -0400, Brad wrote:
> On Tue, Oct 13, 2009 at 02:56:40PM +1000, David Gwynne wrote:
> > do the sb900 chipsets suffer the same bugs as the sb600 ones?
> 
> I can't really answer that at the moment. But looking at the Linux
> driver it isn't implementing any of their implemented quirks for this
> controller. So I have refactored the IDE mode to AHCI mode code into
> a separate function and have dropped the quirk flag for the SB900 to
> start off with.

Here is an updated diff after the PCI product name changes.


Index: ahci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/ahci.c,v
retrieving revision 1.150
diff -u -p -r1.150 ahci.c
--- ahci.c      13 Oct 2009 00:19:38 -0000      1.150
+++ ahci.c      15 Oct 2009 23:33:56 -0000
@@ -421,12 +421,19 @@ const struct ahci_device *ahci_lookup_de
 int                    ahci_no_match(struct pci_attach_args *);
 int                    ahci_vt8251_attach(struct ahci_softc *,
                            struct pci_attach_args *);
+void                   ahci_ati_sb_idetoahci(struct ahci_softc *,
+                           struct pci_attach_args *pa);
 int                    ahci_ati_sb600_attach(struct ahci_softc *,
                            struct pci_attach_args *);
+int                    ahci_amd_hudson2_attach(struct ahci_softc *,
+                           struct pci_attach_args *);
 int                    ahci_nvidia_mcp_attach(struct ahci_softc *,
                            struct pci_attach_args *);
 
 static const struct ahci_device ahci_devices[] = {
+       { PCI_VENDOR_AMD,       PCI_PRODUCT_AMD_HUDSON2_SATA,
+           NULL,               ahci_amd_hudson2_attach },
+
        { PCI_VENDOR_ATI,       PCI_PRODUCT_ATI_SB600_SATA,
            NULL,               ahci_ati_sb600_attach },
        { PCI_VENDOR_ATI,       PCI_PRODUCT_ATI_SBX00_SATA_1,
@@ -575,8 +582,8 @@ ahci_vt8251_attach(struct ahci_softc *sc
        return (0);
 }
 
-int
-ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
+void
+ahci_ati_sb_idetoahci(struct ahci_softc *sc, struct pci_attach_args *pa)
 {
        pcireg_t                        magic;
 
@@ -596,8 +603,22 @@ ahci_ati_sb600_attach(struct ahci_softc 
                pci_conf_write(pa->pa_pc, pa->pa_tag,
                    AHCI_PCI_ATI_SB600_MAGIC, magic);
        }
+}
+
+int
+ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
+{
+       ahci_ati_sb_idetoahci(sc, pa);
 
        sc->sc_flags |= AHCI_F_IGN_FR;
+
+       return (0);
+}
+
+int
+ahci_amd_hudson2_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
+{
+       ahci_ati_sb_idetoahci(sc, pa);
 
        return (0);
 }
Index: pciide.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/pciide.c,v
retrieving revision 1.302
diff -u -p -r1.302 pciide.c
--- pciide.c    13 Oct 2009 22:05:13 -0000      1.302
+++ pciide.c    15 Oct 2009 23:11:48 -0000
@@ -560,6 +560,10 @@ const struct pciide_product_desc pciide_
        { PCI_PRODUCT_AMD_CS5536_IDE,
          0,
          amd756_chip_map
+       },
+       { PCI_PRODUCT_AMD_HUDSON2_IDE,
+         0,
+         ixp_chip_map
        }
 };
 

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

Reply via email to