summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2008-11-22 17:31:39 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2008-11-22 17:31:39 +0000
commitbccd2a6462d7214822653c8afb77cd85c6db8882 (patch)
tree23b0133f02b6ae5c05eebc2627a1171819087d22 /sys/dev
parent07d77c415e0b9b2302e64ec2ca4f4981da1fe60d (diff)
Some nVidia MCP77 AHCI controllers need special handling. There's 12
PCI ID's for MCP77 in our database, but to stay on a safe side, this change affects device 0x0ad4 only. Other ones could be added later. Problem reported and fixed tested by gilles@ on Acer Aspire X3200. ok dlg
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/ahci.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 9309a0da2ae..48a77a8b891 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.142 2008/09/17 06:18:45 brad Exp $ */
+/* $OpenBSD: ahci.c,v 1.143 2008/11/22 17:31:38 mikeb Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -423,12 +423,16 @@ int ahci_vt8251_attach(struct ahci_softc *,
struct pci_attach_args *);
int ahci_ati_sb600_attach(struct ahci_softc *,
struct pci_attach_args *);
+int ahci_nvidia_mcp77_attach(struct ahci_softc *,
+ struct pci_attach_args *);
static const struct ahci_device ahci_devices[] = {
{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA,
ahci_no_match, ahci_vt8251_attach },
{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_SATA,
- NULL, ahci_ati_sb600_attach }
+ NULL, ahci_ati_sb600_attach },
+ { PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP77_AHCI_5,
+ NULL, ahci_nvidia_mcp77_attach }
};
int ahci_pci_match(struct device *, void *, void *);
@@ -589,6 +593,14 @@ ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
}
int
+ahci_nvidia_mcp77_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;