Module Name:    src
Committed By:   skrll
Date:           Sat Nov 24 14:50:04 UTC 2018

Modified Files:
        src/sys/dev/pci: xhci_pci.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/xhci_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/xhci_pci.c
diff -u src/sys/dev/pci/xhci_pci.c:1.16 src/sys/dev/pci/xhci_pci.c:1.17
--- src/sys/dev/pci/xhci_pci.c:1.16	Thu Nov 15 22:15:43 2018
+++ src/sys/dev/pci/xhci_pci.c	Sat Nov 24 14:50:04 2018
@@ -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 @@ alloc_retry:
 		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");

Reply via email to