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.
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 14 Oct 2009 00:38:07 -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_sb900_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_SB900_SATA,
+ NULL, ahci_amd_sb900_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_sb900_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
+{
+ ahci_ati_sb_idetoahci(sc, pa);
return (0);
}
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.