vme: lower alignment requirement in pci bridge drivers

Universe II allows PCI address grannularity of 4K or 64K depending on
the window id. tsi148 only supports 64K. Existing driver implementations
are validating window size against this grannularity and then use that
very size as alignment parameter to pci_bus_alloc_resource.  This
constraint is excessive, alignment by granularity should be enough.

This changes alignment constraint from size to a fixed constraint of
64K.

Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Dmitry Kalinkin 2015-07-08 17:42:17 +03:00 committed by Greg Kroah-Hartman
parent 43b2ec01d2
commit da5ae8a991
2 changed files with 2 additions and 2 deletions

View File

@ -554,7 +554,7 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image,
image->bus_resource.flags = IORESOURCE_MEM; image->bus_resource.flags = IORESOURCE_MEM;
retval = pci_bus_alloc_resource(pdev->bus, retval = pci_bus_alloc_resource(pdev->bus,
&image->bus_resource, size, size, PCIBIOS_MIN_MEM, &image->bus_resource, size, 0x10000, PCIBIOS_MIN_MEM,
0, NULL, NULL); 0, NULL, NULL);
if (retval) { if (retval) {
dev_err(ca91cx42_bridge->parent, "Failed to allocate mem " dev_err(ca91cx42_bridge->parent, "Failed to allocate mem "

View File

@ -846,7 +846,7 @@ static int tsi148_alloc_resource(struct vme_master_resource *image,
image->bus_resource.flags = IORESOURCE_MEM; image->bus_resource.flags = IORESOURCE_MEM;
retval = pci_bus_alloc_resource(pdev->bus, retval = pci_bus_alloc_resource(pdev->bus,
&image->bus_resource, size, size, PCIBIOS_MIN_MEM, &image->bus_resource, size, 0x10000, PCIBIOS_MIN_MEM,
0, NULL, NULL); 0, NULL, NULL);
if (retval) { if (retval) {
dev_err(tsi148_bridge->parent, "Failed to allocate mem " dev_err(tsi148_bridge->parent, "Failed to allocate mem "