explicitly disable INTx interrupts to avoid interrupt storm triggered by
unhandled adapter interrupts fixes PR kern/46596 by Andreas Gustafsson, fix adopted from FreeBSD
This commit is contained in:
parent
b5c030c6f4
commit
e1d78452d4
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vga_pci.c,v 1.55 2016/07/07 06:55:41 msaitoh Exp $ */
|
||||
/* $NetBSD: vga_pci.c,v 1.56 2020/06/17 14:04:03 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vga_pci.c,v 1.55 2016/07/07 06:55:41 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vga_pci.c,v 1.56 2020/06/17 14:04:03 jdolecek Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -230,6 +230,16 @@ vga_pci_attach(device_t parent, device_t self, void *aux)
|
||||
"WARNING: strange BAR @ 0x%02x\n", reg);
|
||||
}
|
||||
|
||||
/*
|
||||
* Disable INTx interrupts, there is no specific chipset driver for
|
||||
* this PCI device. Else unhandled display adapter interrupts
|
||||
* might freeze the CPU.
|
||||
*/
|
||||
pcireg_t cmd = pci_conf_read(pa->pa_pc, pa->pa_tag,
|
||||
PCI_COMMAND_STATUS_REG);
|
||||
pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
|
||||
cmd | PCI_COMMAND_INTERRUPT_DISABLE);
|
||||
|
||||
/* XXX Expansion ROM? */
|
||||
|
||||
vga_common_attach(sc, pa->pa_iot, pa->pa_memt, WSDISPLAY_TYPE_PCIVGA,
|
||||
|
Loading…
Reference in New Issue
Block a user