PCI: altera: Fix TLP_CFG_DW0 for TLP write
authorLey Foon Tan <ley.foon.tan@intel.com>
Tue, 28 Feb 2017 10:37:16 +0000 (18:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Mar 2017 05:41:47 +0000 (06:41 +0100)
commit730b1b20c6cdc63f4ce32efc5a494fc9b141b854
treebe8207cbec978cd3706f6361eb876107bcc7475a
parent1fb738a3dc1304250c755e5e31715137c1c44c50
PCI: altera: Fix TLP_CFG_DW0 for TLP write

commit 2a7275a3d867b228216886aae35e1f64291180b1 upstream.

eb5767122feb ("PCI: altera: Simplify TLB_CFG_DW0 usage") used
TLP_FMTTYPE_CFGRD* (instead of TLP_FMTTYPE_CFGWR*) for TLP writes, which
causes writing to configuration space to fail.  Fix it by using correct
FMTTYPE for write operation.

Fixes: eb5767122feb ("PCI: altera: Simplify TLB_CFG_DW0 usage")
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/host/pcie-altera.c