PCI: Make ACS quirk implementations more uniform
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 5 Sep 2019 22:54:42 +0000 (17:54 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 14 Nov 2019 23:44:03 +0000 (17:44 -0600)
commitc8de8ed2dcaac82e5d76d467dc0b02e0ee79809b
treed0c9c2c873515b3d38507c78237b0817a94822d0
parentf338bb9f0179cb959977b74e8331b312264d720b
PCI: Make ACS quirk implementations more uniform

The ACS quirks differ in needless ways, which makes them look more
different than they really are.

Reorder the ACS flags in order of definitions in the spec:

  PCI_ACS_SV   Source Validation
  PCI_ACS_TB   Translation Blocking
  PCI_ACS_RR   P2P Request Redirect
  PCI_ACS_CR   P2P Completion Redirect
  PCI_ACS_UF   Upstream Forwarding
  PCI_ACS_EC   P2P Egress Control
  PCI_ACS_DT   Direct Translated P2P

(PCIe r5.0, sec 7.7.8.2) and use similar code structure in all.  No
functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
drivers/pci/quirks.c