OSDN Git Service

PCI: Decouple IORESOURCE_ROM_ENABLE and PCI_ROM_ADDRESS_ENABLE
authorBjorn Helgaas <bhelgaas@google.com>
Mon, 28 Nov 2016 23:21:02 +0000 (17:21 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 30 Nov 2016 00:05:09 +0000 (18:05 -0600)
commit7a6d312b50e63f598f5b5914c4fd21878ac2b595
treeb10ffa51fd61641a18e3640cfd1ed5f5223a3c81
parent286c2378aaccc7343ebf17ec6cd86567659caf70
PCI: Decouple IORESOURCE_ROM_ENABLE and PCI_ROM_ADDRESS_ENABLE

Remove the assumption that IORESOURCE_ROM_ENABLE == PCI_ROM_ADDRESS_ENABLE.
PCI_ROM_ADDRESS_ENABLE is the ROM enable bit defined by the PCI spec, so if
we're reading or writing a BAR register value, that's what we should use.
IORESOURCE_ROM_ENABLE is a corresponding bit in struct resource flags.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
drivers/pci/probe.c