Author: hselasky
Date: Fri Jun  5 06:23:03 2015
New Revision: 284012
URL: https://svnweb.freebsd.org/changeset/base/284012

Log:
  Disable VGA PCI interrupts until a chipset driver is loaded for VGA
  PCI devices. Else unhandled display adapter interrupts might freeze
  the CPU or consume a lot of CPU.
  
  PR:           156596
  MFC after:    1 week

Modified:
  head/sys/dev/pci/vga_pci.c

Modified: head/sys/dev/pci/vga_pci.c
==============================================================================
--- head/sys/dev/pci/vga_pci.c  Fri Jun  5 06:06:07 2015        (r284011)
+++ head/sys/dev/pci/vga_pci.c  Fri Jun  5 06:23:03 2015        (r284012)
@@ -126,6 +126,13 @@ vga_pci_is_boot_display(device_t dev)
        if ((config & (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN)) == 0)
                return (0);
 
+       /*
+        * Disable interrupts until a chipset driver is loaded for
+        * this PCI device. Else unhandled display adapter interrupts
+        * might freeze the CPU.
+        */
+       pci_write_config(dev, PCIR_COMMAND, config | PCIM_CMD_INTxDIS, 2);
+
        /* This video card is the boot display: record its unit number. */
        vga_pci_default_unit = unit;
        device_set_flags(dev, 1);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to