]> err.no Git - linux-2.6/blobdiff - drivers/pci/setup-res.c
Make sure that userspace does not retrieve stale asynchronous or
[linux-2.6] / drivers / pci / setup-res.c
index 84eedc965688da31f9c6131104e7d52c7a9c0631..5598b4714f77ac2efaf0f545e404b4c9163c4fcf 100644 (file)
@@ -53,7 +53,9 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
        if (resno < 6) {
                reg = PCI_BASE_ADDRESS_0 + 4 * resno;
        } else if (resno == PCI_ROM_RESOURCE) {
-               new |= res->flags & IORESOURCE_ROM_ENABLE;
+               if (!(res->flags & IORESOURCE_ROM_ENABLE))
+                       return;
+               new |= PCI_ROM_ADDRESS_ENABLE;
                reg = dev->rom_base_reg;
        } else {
                /* Hmm, non-standard resource. */