diff options
Diffstat (limited to 'drivers/pci/setup-res.c')
| -rw-r--r-- | drivers/pci/setup-res.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 7f1acb3918d0..439ac5f5907a 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c @@ -75,12 +75,16 @@ static void pci_std_update_resource(struct pci_dev *dev, int resno)  		 * as zero when disabled, so don't update ROM BARs unless  		 * they're enabled.  See  		 * https://lore.kernel.org/r/[email protected]/ +		 * But we must update ROM BAR for buggy devices where even a +		 * disabled ROM can conflict with other BARs.  		 */ -		if (!(res->flags & IORESOURCE_ROM_ENABLE)) +		if (!(res->flags & IORESOURCE_ROM_ENABLE) && +		    !dev->rom_bar_overlap)  			return;  		reg = dev->rom_base_reg; -		new |= PCI_ROM_ADDRESS_ENABLE; +		if (res->flags & IORESOURCE_ROM_ENABLE) +			new |= PCI_ROM_ADDRESS_ENABLE;  	} else  		return;  |