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 Not pic->pic_addroute but pic->pic_hwunmask...



details:   https://anonhg.NetBSD.org/src/rev/b638a97c5618
branches:  trunk
changeset: 957784:b638a97c5618
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Fri Dec 11 07:49:39 2020 +0000

description:
Not pic->pic_addroute but pic->pic_hwunmask should enable interrupts for MSI-X.

pic->pic_addroute should not enable interrupt, because callers expect
interrupts have been disabled until they call pic->pic_hwunmask.

By the way, the old implement writes zero to Vector Control for MSI-X Table
Entries, howerver it must be read and updated.  Because, there are not only
Mask Bit but also ST lower and ST upper.

diffstat:

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

diffs (27 lines):

diff -r 262b1b6c3398 -r b638a97c5618 sys/arch/x86/pci/msipic.c
--- a/sys/arch/x86/pci/msipic.c Fri Dec 11 07:24:38 2020 +0000
+++ b/sys/arch/x86/pci/msipic.c Fri Dec 11 07:49:39 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msipic.c,v 1.23 2020/05/04 15:55:56 jdolecek Exp $     */
+/*     $NetBSD: msipic.c,v 1.24 2020/12/11 07:49:39 knakahara Exp $    */
 
 /*
  * Copyright (c) 2015 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.23 2020/05/04 15:55:56 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.24 2020/12/11 07:49:39 knakahara Exp $");
 
 #include "opt_intrdebug.h"
 
@@ -598,8 +598,6 @@
        bus_space_write_4(bstag, bshandle,
            entry_base + PCI_MSIX_TABLE_ENTRY_DATA, data);
 #endif /* !XENPV */
-       bus_space_write_4(bstag, bshandle,
-           entry_base + PCI_MSIX_TABLE_ENTRY_VECTCTL, 0);
        BUS_SPACE_WRITE_FLUSH(bstag, bshandle);
 
        ctl = pci_conf_read(pc, tag, off + PCI_MSIX_CTL);



Home | Main Index | Thread Index | Old Index