Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/arch/x86/pci Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/3e15a14188fb
branches:  netbsd-9
changeset: 461129:3e15a14188fb
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Nov 16 16:53:13 2019 +0000

description:
Pull up following revision(s) (requested by hikaru in ticket #429):

        sys/arch/x86/pci/msipic.c: revision 1.19

Disable MSI-X before writing the MSI-X table.

That fixes MSI-X interrupt lost on VMware ESXi 6.7 PCI passthrough devices.

ok knakahara@

diffstat:

 sys/arch/x86/pci/msipic.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r df189799e4f4 -r 3e15a14188fb sys/arch/x86/pci/msipic.c
--- a/sys/arch/x86/pci/msipic.c Sat Nov 16 16:51:45 2019 +0000
+++ b/sys/arch/x86/pci/msipic.c Sat Nov 16 16:53:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msipic.c,v 1.17.2.1 2019/10/15 18:08:31 martin Exp $   */
+/*     $NetBSD: msipic.c,v 1.17.2.2 2019/11/16 16:53:13 martin Exp $   */
 
 /*
  * Copyright (c) 2015 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.17.2.1 2019/10/15 18:08:31 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.17.2.2 2019/11/16 16:53:13 martin Exp $");
 
 #include "opt_intrdebug.h"
 
@@ -548,6 +548,11 @@
        err = pci_get_capability(pc, tag, PCI_CAP_MSIX, &off, NULL);
        KASSERT(err != 0);
 
+       /* Disable MSI-X before writing MSI-X table */
+       ctl = pci_conf_read(pc, tag, off + PCI_MSIX_CTL);
+       ctl &= ~PCI_MSIX_CTL_ENABLE;
+       pci_conf_write(pc, tag, off + PCI_MSIX_CTL, ctl);
+
        entry_base = PCI_MSIX_TABLE_ENTRY_SIZE * msix_vec;
 
        /*



Home | Main Index | Thread Index | Old Index