mbox series

[v2,0/3] PCI: Reference bridge window resources explicitly

Message ID 20200520103147.985326-1-kw@linux.com
Headers show
Series PCI: Reference bridge window resources explicitly | expand

Message

Krzysztof WilczyƄski May 20, 2020, 10:31 a.m. UTC
Add definitions to allow for more explicit mapping of Peer-to-Peer (P2P)
and CardBus bridge window resources.

Added for P2P:

  PCI_BRIDGE_RESOURCES + 0 -> PCI_BRIDGE_IO_WINDOW
  PCI_BRIDGE_RESOURCES + 1 -> PCI_BRIDGE_MEM_WINDOW
  PCI_BRIDGE_RESOURCES + 2 -> PCI_BRIDGE_PREF_MEM_WINDOW

Added for CardBus:

  PCI_BRIDGE_RESOURCES + 0 -> PCI_CB_BRIDGE_IO_0_WINDOW
  PCI_BRIDGE_RESOURCES + 1 -> PCI_CB_BRIDGE_IO_1_WINDOW
  PCI_BRIDGE_RESOURCES + 2 -> PCI_CB_BRIDGE_MEM_0_WINDOW
  PCI_BRIDGE_RESOURCES + 3 -> PCI_CB_BRIDGE_MEM_1_WINDOW

The old way of addressing resources using an index:

  bridge->resource[PCI_BRIDGE_RESOURCES+0]

Would now be replaced with:

  bridge->resource[PCI_BRIDGE_IO_WINDOW]

This series of patches builds on top of the changes proposed before:

  https://lore.kernel.org/r/20100203233931.10803.39854.stgit@bob.kio
  https://lore.kernel.org/r/20100212170022.19522.81135.stgit@bob.kio

Also, correct the PCI quirk for the ALI M7101 chipset so that it would
stop claiming an I/O resource from the memory window which was not
correct.

Krzysztof Wilczynski (3):
  PCI: Correct the PCI quirk for the ALI M7101 chipset
  PCI: Move from using PCI_BRIDGE_RESOURCES to bridge resource
    definitions
  pcmcia: Use resources definitions when freeing CardBus resources

---
Changes in v2:
  Split patches based on the feedback from Bjorn allowing for the
  patch that correct the PCI quirk for the ALI chipset to be applied
  independently, if someone needs to cherry-pick it, before updating
  the said quirk to use definitions for bridge window resources.

 drivers/pci/quirks.c          |  34 +++++-----
 drivers/pci/setup-bus.c       | 116 ++++++++++++++++++----------------
 drivers/pcmcia/yenta_socket.c |  46 +++++++++-----
 include/linux/pci.h           |  14 +++-
 4 files changed, 121 insertions(+), 89 deletions(-)