Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Fixup the retry loop wrt with XHCI_DISABLE_MSI{,X}



details:   https://anonhg.NetBSD.org/src/rev/51d0dcc1bbf1
branches:  trunk
changeset: 994842:51d0dcc1bbf1
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Nov 24 14:50:04 2018 +0000

description:
Fixup the retry loop wrt with XHCI_DISABLE_MSI{,X}

diffstat:

 sys/dev/pci/xhci_pci.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 7a9ee2f7b4ec -r 51d0dcc1bbf1 sys/dev/pci/xhci_pci.c
--- a/sys/dev/pci/xhci_pci.c    Sat Nov 24 14:43:54 2018 +0000
+++ b/sys/dev/pci/xhci_pci.c    Sat Nov 24 14:50:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci_pci.c,v 1.16 2018/11/15 22:15:43 jdolecek Exp $   */
+/*     $NetBSD: xhci_pci.c,v 1.17 2018/11/24 14:50:04 skrll Exp $      */
 /*     OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp   */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.16 2018/11/15 22:15:43 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.17 2018/11/24 14:50:04 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_xhci_pci.h"
@@ -203,17 +203,23 @@
                pci_intr_release(pc, psc->sc_pihp, 1);
                psc->sc_ih = NULL;
                switch (intr_type) {
+#ifndef XHCI_DISABLE_MSIX
                case PCI_INTR_TYPE_MSIX:
                        /* The next try is for MSI: Disable MSIX */
                        counts[PCI_INTR_TYPE_MSIX] = 0;
+#ifndef XHCI_DISABLE_MSI
                        counts[PCI_INTR_TYPE_MSI] = 1;
+#endif
                        counts[PCI_INTR_TYPE_INTX] = 1;
                        goto alloc_retry;
+#endif
+#ifndef XHCI_DISABLE_MSI
                case PCI_INTR_TYPE_MSI:
                        /* The next try is for INTx: Disable MSI */
                        counts[PCI_INTR_TYPE_MSI] = 0;
                        counts[PCI_INTR_TYPE_INTX] = 1;
                        goto alloc_retry;
+#endif
                case PCI_INTR_TYPE_INTX:
                default:
                        aprint_error_dev(self, "couldn't establish interrupt");



Home | Main Index | Thread Index | Old Index