PCI: altera: Fix Requester ID for config accesses
authorLey Foon Tan <lftan@altera.com>
Fri, 4 Dec 2015 22:21:12 +0000 (16:21 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 4 Dec 2015 22:21:12 +0000 (16:21 -0600)
commit23ec56708af7155414a979675dc8132a5d6e16ef
treedf80bf595d5dfc1ff564f9453c308f23f715a46d
parent7f52f31443ae9b2e6a71ec54cfc5a2c89006ea27
PCI: altera: Fix Requester ID for config accesses

The Requester ID should use the Root Port devfn and it should be always 0.
Previously we constructed the Requester ID using the *Completer* devfn,
i.e., the devfn of the Function we expect to respond to the config access.
This causes issues when accessing configuration space for devices other
than the Root Port.

Build the Requester ID using the Root Port devfn.

Tested on Ethernet adapter card with multi-functions.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/host/pcie-altera.c