powerpc/pseries: Fix PCI config address for DDW
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Wed, 25 May 2016 23:56:07 +0000 (09:56 +1000)
committerWilly Tarreau <w@1wt.eu>
Sun, 21 Aug 2016 21:22:45 +0000 (23:22 +0200)
commitcc80e5c914b0534f6dcaf8d45031c73a6ea2ae7b
treefb36b9c0063edf1cdb45a8f1ed371c01e8b51c40
parentb738ed81a859e1185d2c9b54ef15456c8117f306
powerpc/pseries: Fix PCI config address for DDW

commit 8a934efe94347eee843aeea65bdec8077a79e259 upstream.

In commit 8445a87f7092 "powerpc/iommu: Remove the dependency on EEH
struct in DDW mechanism", the PE address was replaced with the PCI
config address in order to remove dependency on EEH. According to PAPR
spec, firmware (pHyp or QEMU) should accept "xxBBSSxx" format PCI config
address, not "xxxxBBSS" provided by the patch. Note that "BB" is PCI bus
number and "SS" is the combination of slot and function number.

This fixes the PCI address passed to DDW RTAS calls.

Fixes: 8445a87f7092 ("powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism")
Cc: stable@vger.kernel.org # v3.4+
Reported-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Tested-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Willy Tarreau <w@1wt.eu>
arch/powerpc/platforms/pseries/iommu.c