Module Name:    src
Committed By:   knakahara
Date:           Fri Dec 11 07:49:40 UTC 2020

Modified Files:
        src/sys/arch/x86/pci: msipic.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x86/pci/msipic.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/msipic.c
diff -u src/sys/arch/x86/pci/msipic.c:1.23 src/sys/arch/x86/pci/msipic.c:1.24
--- src/sys/arch/x86/pci/msipic.c:1.23	Mon May  4 15:55:56 2020
+++ src/sys/arch/x86/pci/msipic.c	Fri Dec 11 07:49:39 2020
@@ -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 @@ msix_addroute(struct pic *pic, struct cp
 	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);

Reply via email to