summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2011-08-20 20:16:02 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2011-08-20 20:16:02 +0000
commit992fd5aa59f2f7cadefbdf736766b0dfd6c6af19 (patch)
treee2f54fd3116657986af0e6a7fc9a1d94e4beaac3 /sys/dev/pci
parent9c3ef0d88afe19d6cfccd3ca29d65d8cc0df4764 (diff)
Don't wait for FR to come on after setting the FRE bit in the port command
register. The spec doesn't say we have to do this while it mentions several times one needs to wait for FR to clear after clearing FRE. The Linux driver doesn't wait for it either. This allows us to get rid of the AHCI_F_IGN_FR quirk. As a side-effect this diff will probably stop ahci(4) attaching to (some) NVIDIA fakeRAID devices. That's good since it is consistent with what we do for Intel fakeRAID. ok mikeb@, jmatthew@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ahci.c46
1 files changed, 4 insertions, 42 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 03467d9fefa..706e680794d 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.181 2011/07/04 22:06:07 jmatthew Exp $ */
+/* $OpenBSD: ahci.c,v 1.182 2011/08/20 20:16:01 kettenis Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -416,9 +416,8 @@ struct ahci_softc {
int sc_flags;
#define AHCI_F_NO_NCQ (1<<0)
-#define AHCI_F_IGN_FR (1<<1)
-#define AHCI_F_IPMS_PROBE (1<<2) /* IPMS on failed PMP probe */
-#define AHCI_F_NO_PMP (1<<3) /* ignore PMP capability */
+#define AHCI_F_IPMS_PROBE (1<<1) /* IPMS on failed PMP probe */
+#define AHCI_F_NO_PMP (1<<2) /* ignore PMP capability */
u_int sc_ncmds;
@@ -459,8 +458,6 @@ int ahci_amd_hudson2_attach(struct ahci_softc *,
struct pci_attach_args *);
int ahci_intel_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,
@@ -518,27 +515,6 @@ static const struct ahci_device ahci_devices[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_EP80579_AHCI,
NULL, ahci_intel_attach },
- { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP65_AHCI_2,
- NULL, ahci_nvidia_mcp_attach },
- { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP67_AHCI_1,
- NULL, ahci_nvidia_mcp_attach },
- { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP73_AHCI_5,
- NULL, ahci_nvidia_mcp_attach },
- { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP73_AHCI_9,
- NULL, ahci_nvidia_mcp_attach },
- { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP77_AHCI_5,
- NULL, ahci_nvidia_mcp_attach },
- { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP77_AHCI_6,
- NULL, ahci_nvidia_mcp_attach },
- { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP79_AHCI_1,
- NULL, ahci_nvidia_mcp_attach },
- { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP79_AHCI_2,
- NULL, ahci_nvidia_mcp_attach },
- { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP79_AHCI_3,
- NULL, ahci_nvidia_mcp_attach },
- { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP79_AHCI_4,
- NULL, ahci_nvidia_mcp_attach },
-
{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA,
ahci_no_match, ahci_vt8251_attach }
};
@@ -730,7 +706,7 @@ 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 | AHCI_F_IPMS_PROBE;
+ sc->sc_flags |= AHCI_F_IPMS_PROBE;
return (0);
}
@@ -758,14 +734,6 @@ ahci_intel_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
}
int
-ahci_nvidia_mcp_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
-{
- sc->sc_flags |= AHCI_F_IGN_FR;
-
- return (0);
-}
-
-int
ahci_pci_match(struct device *parent, void *match, void *aux)
{
struct pci_attach_args *pa = aux;
@@ -1551,12 +1519,6 @@ ahci_port_start(struct ahci_port *ap, int fre_only)
}
#endif
- if (!(ap->ap_sc->sc_flags & AHCI_F_IGN_FR)) {
- /* Wait for FR to come on */
- if (ahci_pwait_set(ap, AHCI_PREG_CMD, AHCI_PREG_CMD_FR, 1))
- return (2);
- }
-
/* Wait for CR to come on */
if (!fre_only &&
ahci_pwait_set(ap, AHCI_PREG_CMD, AHCI_PREG_CMD_CR, 1))