Yinghai Lu 552bc94ebe 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 <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Wei Yang <weiyang@linux.vnet.ibm.com>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2015-06-01 17:56:32 -05:00
..
2015-04-16 13:53:32 -05:00
2015-01-22 13:59:45 -06:00
2014-12-16 14:08:14 +01:00
2014-06-10 20:20:19 -06:00
2015-04-10 08:27:18 -05:00
2015-04-16 13:53:32 -05:00
2014-06-10 20:20:19 -06:00
2015-04-10 08:27:18 -05:00
2014-06-10 20:20:19 -06:00