]> asedeno.scripts.mit.edu Git - linux.git/commit
PCI: mvebu: Handle changes to the bridge windows while enabled
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Mon, 12 Dec 2016 18:30:20 +0000 (11:30 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 30 Jan 2017 15:39:38 +0000 (09:39 -0600)
commitd9bf28e2650fe3eeefed7e34841aea07d10c6543
treebe92662faeb581056d13a21cf04c5376a8091cd4
parent7ce7d89f48834cefece7804d38fc5d85382edf77
PCI: mvebu: Handle changes to the bridge windows while enabled

The PCI core will write to the bridge window config multiple times while
they are enabled.  This can lead to mbus failures like this:

 mvebu_mbus: cannot add window '4:e8', conflicts with another window
 mvebu-pcie mbus:pex@e0000000: Could not create MBus window at [mem 0xe0000000-0xe00fffff]: -22

For me this is happening during a hotplug cycle.  The PCI core is not
changing the values, just writing them twice while active.

The patch addresses the general case of any change to an active window, but
not atomically.  The code is slightly refactored so io and mem can share
more of the window logic.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
drivers/pci/host/pci-mvebu.c