-/* $OpenBSD: ahci_pci.c,v 1.17 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: ahci_pci.c,v 1.18 2024/06/16 18:00:08 kn Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
struct pci_attach_args *);
int ahci_samsung_attach(struct ahci_softc *,
struct pci_attach_args *);
+int ahci_storx_attach(struct ahci_softc *,
+ struct pci_attach_args *);
static const struct ahci_device ahci_devices[] = {
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON2_SATA_1,
NULL, ahci_samsung_attach },
{ PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8251_SATA,
- ahci_no_match, ahci_vt8251_attach }
+ ahci_no_match, ahci_vt8251_attach },
+
+ { PCI_VENDOR_ZHAOXIN, PCI_PRODUCT_ZHAOXIN_STORX_AHCI,
+ NULL, ahci_storx_attach },
};
int ahci_pci_match(struct device *, void *, void *);
return (0);
}
+int
+ahci_storx_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
+{
+ /*
+ * Disable MSI with the ZX-100/ZX-200/ZX-E StorX AHCI Controller
+ * in the Unchartevice 6640MA notebook, otherwise ahci(4) hangs
+ * with SATA speed set to "Gen3" in BIOS.
+ */
+ sc->sc_flags |= AHCI_F_NO_MSI;
+
+ return (0);
+}
+
int
ahci_pci_match(struct device *parent, void *match, void *aux)
{