Module Name:    xsrc
Committed By:   macallan
Date:           Fri Jan 14 19:42:56 UTC 2022

Modified Files:
        xsrc/external/mit/libpciaccess/dist/src: netbsd_pci.c

Log Message:
add flag to disable blindly enabling memory and IO access on everything we
find


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
    xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c
diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.20 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.21
--- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.20	Fri Oct  9 10:48:18 2020
+++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c	Fri Jan 14 19:42:56 2022
@@ -333,6 +333,7 @@ pci_device_netbsd_probe(struct pci_devic
 	err = pci_read(domain, bus, dev, func, PCI_COMMAND_STATUS_REG, &reg);
 	if (err)
 		return err;
+#ifndef AVOID_DEVICE_ENABLE
 	if ((reg & (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE)) !=
 	    (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE)) {
 		reg |= PCI_COMMAND_IO_ENABLE |
@@ -343,7 +344,7 @@ pci_device_netbsd_probe(struct pci_devic
 		if (err)
 			return err;
 	}
-
+#endif
 	err = pci_read(domain, bus, dev, func, PCI_BHLC_REG, &reg);
 	if (err)
 		return err;

Reply via email to