From: Yinghai Lu Date: Fri, 29 May 2015 05:40:00 +0000 (-0700) Subject: PCI: Preserve resource size during alignment reordering X-Git-Tag: omap-for-v4.2/wakeirq-drivers-v2^2~2^2~11^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=552bc94ebeeb189d0ac682dae95cf05e6b72d7fd;p=pandora-kernel.git PCI: Preserve resource size during alignment reordering In d74b9027a4da ("PCI: Consider additional PF's IOV BAR alignment in sizing and assigning"), we store additional alignment in realloc_head and take this into consideration for assignment. In __assign_resources_sorted(), we changed dev_res->res->start, then used resource_start() (which depends on res->start), so the recomputed res->end was completely bogus. Even if we'd had the correct size, the end would have been off by one. Preserve the resource size when we adjust its alignment. [bhelgaas: changelog] Fixes: d74b9027a4da ("PCI: Consider additional PF's IOV BAR alignment in sizing and assigning") Signed-off-by: Yinghai Lu Signed-off-by: Bjorn Helgaas Acked-by: Wei Yang CC: Benjamin Herrenschmidt --- Reading git-diff-tree failed