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)
committerSasha Levin <alexander.levin@verizon.com>
Sat, 20 Aug 2016 03:08:37 +0000 (23:08 -0400)
commit63933c775e08459df80b6e76ead685bf20105494
treec915245e7f13d33a7b5c0fd31f2f90f137631209
parent049de1972f59980634d4b3a31ce7defaa194d471
powerpc/pseries: Fix PCI config address for DDW

[ Upstream commit 8a934efe94347eee843aeea65bdec8077a79e259 ]

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: Sasha Levin <alexander.levin@verizon.com>
arch/powerpc/platforms/pseries/iommu.c