]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
i386: Fix broken mmiocfg accesses
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 12 Aug 2007 09:23:16 +0000 (02:23 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 12 Aug 2007 09:23:16 +0000 (02:23 -0700)
Commit 3320ad994afb2c44ad34b3b34c3c5cf0da297331 broke mmio config space
accesses totally on i386 - it dropped the "reg" offset to the address.

Cc: dean gaudet <dean@arctic.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/pci/mmconfig.c

index 0d46b7a88b3bebe38c9773b2c03f9e335f165aeb..1bf5816d34c85e294717fecf082bdd90baf26f38 100644 (file)
@@ -115,13 +115,13 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
 
        switch (len) {
        case 1:
-               mmio_config_writeb(mmcfg_virt_addr, value);
+               mmio_config_writeb(mmcfg_virt_addr + reg, value);
                break;
        case 2:
-               mmio_config_writew(mmcfg_virt_addr, value);
+               mmio_config_writew(mmcfg_virt_addr + reg, value);
                break;
        case 4:
-               mmio_config_writel(mmcfg_virt_addr, value);
+               mmio_config_writel(mmcfg_virt_addr + reg, value);
                break;
        }
        spin_unlock_irqrestore(&pci_config_lock, flags);