Source-Changes-HG archive

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

[src/trunk]: src/sys Add verbose messages when the kernel disables MSI/MSI-X.



details:   https://anonhg.NetBSD.org/src/rev/0e3b1bb78927
branches:  trunk
changeset: 341364:0e3b1bb78927
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Nov 02 09:29:08 2015 +0000

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

diffstat:

 sys/arch/x86/pci/pci_machdep.c |  6 ++++--
 sys/dev/pci/pci.c              |  8 +++++---
 2 files changed, 9 insertions(+), 5 deletions(-)

diffs (59 lines):

diff -r dda6ce0871db -r 0e3b1bb78927 sys/arch/x86/pci/pci_machdep.c
--- a/sys/arch/x86/pci/pci_machdep.c    Mon Nov 02 08:37:28 2015 +0000
+++ b/sys/arch/x86/pci/pci_machdep.c    Mon Nov 02 09:29:08 2015 +0000
@@ -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 @@
        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;
diff -r dda6ce0871db -r 0e3b1bb78927 sys/dev/pci/pci.c
--- a/sys/dev/pci/pci.c Mon Nov 02 08:37:28 2015 +0000
+++ b/sys/dev/pci/pci.c Mon Nov 02 09:29:08 2015 +0000
@@ -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 @@
                        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



Home | Main Index | Thread Index | Old Index