]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
sparc: Add alignment flag to PCI expansion resources
authorKjetil Oftedal <oftedal@gmail.com>
Wed, 19 Oct 2011 23:20:50 +0000 (16:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Oct 2011 23:20:50 +0000 (16:20 -0700)
Currently no type of alignment is specified for PCI expansion roms while
parsing the openfirmware tree. This causes calls to pci_map_rom() to fail.
IORESOURCE_SIZEALIGN is the default alignment used for rom resouces in
pci/probe.c, and has been verified to work with various cards on a ultra 10.

Signed-off-By: Kjetil Oftedal <oftedal@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/pci.c

index 1e94f946570ee6bfb56f66b6a42b9d99032d2a75..8aa0d44085860f67cf4f454a8a4c4de5d03d2207 100644 (file)
@@ -230,7 +230,8 @@ static void pci_parse_of_addrs(struct platform_device *op,
                        res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2];
                } else if (i == dev->rom_base_reg) {
                        res = &dev->resource[PCI_ROM_RESOURCE];
-                       flags |= IORESOURCE_READONLY | IORESOURCE_CACHEABLE;
+                       flags |= IORESOURCE_READONLY | IORESOURCE_CACHEABLE
+                             | IORESOURCE_SIZEALIGN;
                } else {
                        printk(KERN_ERR "PCI: bad cfg reg num 0x%x\n", i);
                        continue;