PCI: disable MEM decoding while updating 64-bit MEM BARs
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 10 Jul 2012 01:49:37 +0000 (19:49 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 10 Jul 2012 01:50:53 +0000 (19:50 -0600)
commit9aac537e0e33f4e4f28b8e7472c283fb6460c650
tree0e27b819f093360a0e028b0af20ee8ae6ad949f3
parentbbffe435248444065bd76141c41bbe65db950cc9
PCI: disable MEM decoding while updating 64-bit MEM BARs

When we update 64-bit BARs, we have to perform two config writes.  Between
the writes, the half-written BAR value could match a MEM access intended
for another device.  This could result in corruption of this device (for
writes) or an unexpected response machine check (for reads).

To prevent this, disable MEM decoding while updating such BARs.  This uses
the same safety test as 253d2e5498, which disables both MEM and IO while
sizing BARs, namely, we don't disable decoding for host bridge devices.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/setup-res.c
This page took 0.030468 seconds and 5 git commands to generate.