Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/pci Supress verbose message "This pci host supp...



details:   https://anonhg.NetBSD.org/src/rev/ffb581a46bc6
branches:  trunk
changeset: 821552:ffb581a46bc6
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Feb 09 03:38:01 2017 +0000

description:
Supress verbose message "This pci host supports neither MSI nor MSI-X."
on VMware and KVM. OK'd by k-nakahara.

diffstat:

 sys/arch/x86/pci/pci_machdep.c |  19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diffs (47 lines):

diff -r 635f19b3b2da -r ffb581a46bc6 sys/arch/x86/pci/pci_machdep.c
--- a/sys/arch/x86/pci/pci_machdep.c    Thu Feb 09 03:29:55 2017 +0000
+++ b/sys/arch/x86/pci/pci_machdep.c    Thu Feb 09 03:38:01 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.76 2016/08/25 12:21:21 nonaka Exp $  */
+/*     $NetBSD: pci_machdep.c,v 1.77 2017/02/09 03:38:01 msaitoh 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.76 2016/08/25 12:21:21 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.77 2017/02/09 03:38:01 msaitoh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -483,7 +483,12 @@
            PCI_SUBCLASS(class) != PCI_SUBCLASS_BRIDGE_HOST)
                return;
 
-       if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSI)) {
+       /* VMware and KVM use old chipset, but they can use MSI/MSI-X */
+       if ((cpu_feature[1] & CPUID2_RAZ)
+           && (pci_has_msi_quirk(id, PCI_QUIRK_ENABLE_MSI_VM))) {
+                       pba->pba_flags |= PCI_FLAGS_MSI_OKAY;
+                       pba->pba_flags |= PCI_FLAGS_MSIX_OKAY;
+       } else 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("\n");
@@ -500,14 +505,6 @@
                pba->pba_flags |= PCI_FLAGS_MSIX_OKAY;
        }
 
-       /* VMware and KVM use old chipset, but they can use MSI/MSI-X */
-       if (cpu_feature[1] & CPUID2_RAZ) {
-               if (pci_has_msi_quirk(id, PCI_QUIRK_ENABLE_MSI_VM)) {
-                       pba->pba_flags |= PCI_FLAGS_MSI_OKAY;
-                       pba->pba_flags |= PCI_FLAGS_MSIX_OKAY;
-               }
-       }
-
        /*
         * Don't enable MSI on a HyperTransport bus.  In order to
         * determine that bus 0 is a HyperTransport bus, we look at



Home | Main Index | Thread Index | Old Index