Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/libpciaccess/dist/src add flag to disable bli...



details:   https://anonhg.NetBSD.org/xsrc/rev/f67ed2eeb77b
branches:  trunk
changeset: 6949:f67ed2eeb77b
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Jan 14 19:42:56 2022 +0000

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

diffstat:

 external/mit/libpciaccess/dist/src/netbsd_pci.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r e40ec937f830 -r f67ed2eeb77b external/mit/libpciaccess/dist/src/netbsd_pci.c
--- a/external/mit/libpciaccess/dist/src/netbsd_pci.c   Sun Jan 09 09:50:52 2022 +0000
+++ b/external/mit/libpciaccess/dist/src/netbsd_pci.c   Fri Jan 14 19:42:56 2022 +0000
@@ -333,6 +333,7 @@
        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 @@
                if (err)
                        return err;
        }
-
+#endif
        err = pci_read(domain, bus, dev, func, PCI_BHLC_REG, &reg);
        if (err)
                return err;



Home | Main Index | Thread Index | Old Index