Revert "Revert "PCI: Reduce warnings on possible RW1C corruption""

This reverts commit 7be3754601.

It is no longer needed as we are able to update the abi at this point in
time.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I94e86dbe2ba7f2f860854cf1f7f825a9a8215853
This commit is contained in:
Greg Kroah-Hartman
2022-04-20 12:33:19 +02:00
committed by Todd Kjos
parent d953392f01
commit 87471644eb
2 changed files with 7 additions and 3 deletions

View File

@@ -160,9 +160,12 @@ int pci_generic_config_write32(struct pci_bus *bus, unsigned int devfn,
* write happen to have any RW1C (write-one-to-clear) bits set, we * write happen to have any RW1C (write-one-to-clear) bits set, we
* just inadvertently cleared something we shouldn't have. * just inadvertently cleared something we shouldn't have.
*/ */
dev_warn_ratelimited(&bus->dev, "%d-byte config write to %04x:%02x:%02x.%d offset %#x may corrupt adjacent RW1C bits\n", if (!bus->unsafe_warn) {
size, pci_domain_nr(bus), bus->number, dev_warn(&bus->dev, "%d-byte config write to %04x:%02x:%02x.%d offset %#x may corrupt adjacent RW1C bits\n",
PCI_SLOT(devfn), PCI_FUNC(devfn), where); size, pci_domain_nr(bus), bus->number,
PCI_SLOT(devfn), PCI_FUNC(devfn), where);
bus->unsafe_warn = 1;
}
mask = ~(((1 << (size * 8)) - 1) << ((where & 0x3) * 8)); mask = ~(((1 << (size * 8)) - 1) << ((where & 0x3) * 8));
tmp = readl(addr) & mask; tmp = readl(addr) & mask;

View File

@@ -656,6 +656,7 @@ struct pci_bus {
struct bin_attribute *legacy_io; /* Legacy I/O for this bus */ struct bin_attribute *legacy_io; /* Legacy I/O for this bus */
struct bin_attribute *legacy_mem; /* Legacy mem */ struct bin_attribute *legacy_mem; /* Legacy mem */
unsigned int is_added:1; unsigned int is_added:1;
unsigned int unsafe_warn:1; /* warned about RW1C config write */
}; };
#define to_pci_bus(n) container_of(n, struct pci_bus, dev) #define to_pci_bus(n) container_of(n, struct pci_bus, dev)