Module Name:    src
Committed By:   knakahara
Date:           Mon Nov  2 09:29:08 UTC 2015

Modified Files:
        src/sys/arch/x86/pci: pci_machdep.c
        src/sys/dev/pci: pci.c

Log Message:
Add verbose messages when the kernel disables MSI/MSI-X.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/x86/pci/pci_machdep.c
cvs rdiff -u -r1.149 -r1.150 src/sys/dev/pci/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/arch/x86/pci/pci_machdep.c
diff -u src/sys/arch/x86/pci/pci_machdep.c:1.71 src/sys/arch/x86/pci/pci_machdep.c:1.72
--- src/sys/arch/x86/pci/pci_machdep.c:1.71	Fri Oct  2 05:22:52 2015
+++ src/sys/arch/x86/pci/pci_machdep.c	Mon Nov  2 09:29:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.71 2015/10/02 05:22:52 msaitoh Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.72 2015/11/02 09:29:08 knakahara Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.71 2015/10/02 05:22:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.72 2015/11/02 09:29:08 knakahara Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -483,9 +483,11 @@ pci_attach_hook(device_t parent, device_
 	if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSI)) {
 		pba->pba_flags &= ~PCI_FLAGS_MSI_OKAY;
 		pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY;
+		aprint_verbose_dev(self, "This pci host supports neither MSI nor MSI-X.\n");
 	} else if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSIX)) {
 		pba->pba_flags |= PCI_FLAGS_MSI_OKAY;
 		pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY;
+		aprint_verbose_dev(self, "This pci host does not support MSI-X.\n");
 	} else {
 		pba->pba_flags |= PCI_FLAGS_MSI_OKAY;
 		pba->pba_flags |= PCI_FLAGS_MSIX_OKAY;

Index: src/sys/dev/pci/pci.c
diff -u src/sys/dev/pci/pci.c:1.149 src/sys/dev/pci/pci.c:1.150
--- src/sys/dev/pci/pci.c:1.149	Fri Oct  2 05:22:53 2015
+++ src/sys/dev/pci/pci.c	Mon Nov  2 09:29:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci.c,v 1.149 2015/10/02 05:22:53 msaitoh Exp $	*/
+/*	$NetBSD: pci.c,v 1.150 2015/11/02 09:29:08 knakahara Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1997, 1998
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.149 2015/10/02 05:22:53 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.150 2015/11/02 09:29:08 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -432,7 +432,9 @@ pci_probe_device(struct pci_softc *sc, p
 			if (addr == PCI_HT_MSI_FIXED_ADDR) {
 				pa.pa_flags |= PCI_FLAGS_MSI_OKAY;
 				pa.pa_flags |= PCI_FLAGS_MSIX_OKAY;
-			}
+			} else
+				aprint_verbose_dev(sc->sc_dev,
+				    "HyperTransport MSI mapping is not supported yet. Disable MSI/MSI-X.\n");
 		}
 	}
 #endif

Reply via email to