patch-2.3.20 linux/drivers/pci/setup.c

Next file: linux/drivers/scsi/ChangeLog.ncr53c8xx
Previous file: linux/drivers/pci/quirks.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.19/linux/drivers/pci/setup.c linux/drivers/pci/setup.c
@@ -16,7 +16,6 @@
 #include <linux/ioport.h>
 
 #include <asm/cache.h>
-#include <asm/pci.h>
 
 
 #define DEBUG_CONFIG 0
@@ -108,9 +107,12 @@
 	   (ie. do not respond to memory space writes) when it is left
 	   enabled.  A good example are QlogicISP adapters.  */
 
-	pci_read_config_dword(dev, PCI_ROM_ADDRESS, &reg);
-	reg &= ~PCI_ROM_ADDRESS_ENABLE;
-	pci_write_config_dword(dev, PCI_ROM_ADDRESS, reg);
+	if (dev->rom_base_reg) {
+		pci_read_config_dword(dev, dev->rom_base_reg, &reg);
+		reg &= ~PCI_ROM_ADDRESS_ENABLE;
+		pci_write_config_dword(dev, dev->rom_base_reg, reg);
+		dev->resource[PCI_ROM_RESOURCE].flags &= ~PCI_ROM_ADDRESS_ENABLE;
+	}
 
 	/* All of these (may) have I/O scattered all around and may not
 	   use I/O base address registers at all.  So we just have to

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)