summaryrefslogtreecommitdiff
path: root/sys/dev/pci/xhci_pci.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2014-04-07 23:32:42 +0000
committerBrad Smith <brad@cvs.openbsd.org>2014-04-07 23:32:42 +0000
commit7786528874c7067ab82f278dcfc3eda938f3468d (patch)
tree9ae12a1e08501f94fbf946618f41e718fe71e71d /sys/dev/pci/xhci_pci.c
parentb80601ac752c16b9d94d9f7f0a122f75d5e9f321 (diff)
Add MSI support for xhci(4). Also add a quirk for some of the Fresco
Logic controllers, taken from the Linux kernel. ok mpi@
Diffstat (limited to 'sys/dev/pci/xhci_pci.c')
-rw-r--r--sys/dev/pci/xhci_pci.c14
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;
}