OSDN Git Service

PCI: mvebu: Fix I/O space end address calculation
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 3 Aug 2018 14:38:44 +0000 (16:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Sep 2018 07:40:39 +0000 (09:40 +0200)
commitd07bbe50d1b7e98fb1afeed62506c28dd1a21700
treef024fbcd00dc7b7b22bd3a0899a6d811df436868
parent242343ebf645ca5c89aac3ee9503484177c7bb6a
PCI: mvebu: Fix I/O space end address calculation

[ Upstream commit dfd0309fd7b30a5baffaf47b2fccb88b46d64d69 ]

pcie->realio.end should be the address of last byte of the area,
therefore using resource_size() of another resource is not correct, we
must substract 1 to get the address of the last byte.

Fixes: 11be65472a427 ("PCI: mvebu: Adapt to the new device tree layout")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/host/pci-mvebu.c