]> git.ipfire.org Git - people/ms/linux.git/commit
PCI: altera: Check TLP completion status
authorLey Foon Tan <lftan@altera.com>
Fri, 4 Dec 2015 22:21:16 +0000 (16:21 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 4 Dec 2015 22:21:16 +0000 (16:21 -0600)
commitea1d3795f65e14619642b5f67382800f58e43f3d
tree49c6c45b9c7cb4c8360034d1cd4611a9305304a4
parent23ec56708af7155414a979675dc8132a5d6e16ef
PCI: altera: Check TLP completion status

Check TLP packet successful completion status.  This fix the issue when
accessing multi-function devices in enumeration process, TLP will return
error when accessing non-exist function number.  Returns PCI error code
instead of generic errno.

Tested on Ethernet adapter card with multi-functions.

[bhelgaas: simplify completion status checking code]
Signed-off-by: Ley Foon Tan <lftan@altera.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/host/pcie-altera.c