summaryrefslogtreecommitdiff
path: root/sys/dev/ahci
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2020-09-30 17:10:49 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2020-09-30 17:10:49 +0000
commit6b74091dd5c4f4239c779785f7bdff5e11b5c610 (patch)
tree8577bc273bd05bcaff80bb74d73ac795167ccc2b /sys/dev/ahci
parenta52c8a65026df8910b0ad58c79ae8eb1eb166a8f (diff)
Notes
Diffstat (limited to 'sys/dev/ahci')
-rw-r--r--sys/dev/ahci/ahci_generic.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/dev/ahci/ahci_generic.c b/sys/dev/ahci/ahci_generic.c
index e482c95c9502..79130e9e9e57 100644
--- a/sys/dev/ahci/ahci_generic.c
+++ b/sys/dev/ahci/ahci_generic.c
@@ -86,11 +86,22 @@ ahci_fdt_probe(device_t dev)
#endif
#ifdef DEV_ACPI
+
+static const struct ahci_acpi_quirk {
+ const char* hid;
+ u_int quirks;
+} ahci_acpi_quirks[] = {
+ { "NXP0004", AHCI_Q_NOPMP },
+ { NULL, 0 }
+};
+
+
static int
ahci_acpi_probe(device_t dev)
{
struct ahci_controller *ctlr = device_get_softc(dev);
ACPI_HANDLE h;
+ int i;
if ((h = acpi_get_handle(dev)) == NULL)
return (ENXIO);
@@ -105,6 +116,12 @@ ahci_acpi_probe(device_t dev)
if (bootverbose)
device_printf(dev, "Bus is%s cache-coherent\n",
ctlr->dma_coherent ? "" : " not");
+ for (i = 0; ahci_acpi_quirks[i].hid != NULL; i++) {
+ if (acpi_MatchHid(h, ahci_acpi_quirks[i].hid) != ACPI_MATCHHID_NOMATCH) {
+ ctlr->quirks = ahci_acpi_quirks[i].quirks;
+ break;
+ }
+ }
return (BUS_PROBE_DEFAULT);
}