diff options
author | 2014-04-07 23:32:41 +0000 | |
---|---|---|
committer | 2014-04-07 23:32:41 +0000 | |
commit | 8be802740fa9009830c93d2e4749e3b4a6f69d45 (patch) | |
tree | dd6731794b3fae40d919147228ee80d1e2ebfe18 | |
parent | Enable upd(4) on archs where uhidev(4) is present, requested by mpi@. (diff) | |
download | wireguard-openbsd-8be802740fa9009830c93d2e4749e3b4a6f69d45.tar.xz wireguard-openbsd-8be802740fa9009830c93d2e4749e3b4a6f69d45.zip |
Add MSI support for xhci(4). Also add a quirk for some of the Fresco
Logic controllers, taken from the Linux kernel.
ok mpi@
-rw-r--r-- | sys/dev/pci/xhci_pci.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/pci/xhci_pci.c b/sys/dev/pci/xhci_pci.c index 6b881036fb5..a908f61954f 100644 --- a/sys/dev/pci/xhci_pci.c +++ b/sys/dev/pci/xhci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci_pci.c,v 1.2 2014/03/25 17:23:40 mpi Exp $ */ +/* $OpenBSD: xhci_pci.c,v 1.3 2014/04/07 23:32:41 brad Exp $ */ /* * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -109,8 +109,18 @@ xhci_pci_attach(struct device *parent, struct device *self, void *aux) psc->sc_tag = pa->pa_tag; psc->sc.sc_bus.dmatag = pa->pa_dmat; + /* Handle quirks */ + switch (PCI_VENDOR(pa->pa_id)) { + case PCI_VENDOR_FRESCO: + /* FL1000 / FL1400 claim MSI support but do not support MSI */ + if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_FRESCO_FL1000 || + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_FRESCO_FL1400) + pa->pa_flags &= ~PCI_FLAGS_MSI_ENABLED; + break; + } + /* Map and establish the interrupt. */ - if (pci_intr_map(pa, &ih) != 0) { + if (pci_intr_map_msi(pa, &ih) != 0 && pci_intr_map(pa, &ih) != 0) { printf(": couldn't map interrupt\n"); goto unmap_ret; } |