]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
myri10ge: use ioremap_wc
authorBrice Goglin <brice@myri.com>
Mon, 21 Jul 2008 08:26:25 +0000 (10:26 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Tue, 22 Jul 2008 20:09:13 +0000 (16:09 -0400)
Switch to ioremap_wc(). We keep the MTRR code since ioremap_wc()
will use UC_MINUS when falling back to uncachable, and thus let
the MTRR WC take precedence.

Also rename the error path better.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/myri10ge/myri10ge.c

index 3305ce3c5b3f8a01fb97a71efca4f9ce8072b707..3ab0e5289f7abd9cc2759870c77d6f8f913abcfd 100644 (file)
@@ -3720,14 +3720,14 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (mgp->sram_size > mgp->board_span) {
                dev_err(&pdev->dev, "board span %ld bytes too small\n",
                        mgp->board_span);
-               goto abort_with_wc;
+               goto abort_with_mtrr;
        }
-       mgp->sram = ioremap(mgp->iomem_base, mgp->board_span);
+       mgp->sram = ioremap_wc(mgp->iomem_base, mgp->board_span);
        if (mgp->sram == NULL) {
                dev_err(&pdev->dev, "ioremap failed for %ld bytes at 0x%lx\n",
                        mgp->board_span, mgp->iomem_base);
                status = -ENXIO;
-               goto abort_with_wc;
+               goto abort_with_mtrr;
        }
        memcpy_fromio(mgp->eeprom_strings,
                      mgp->sram + mgp->sram_size - MYRI10GE_EEPROM_STRINGS_SIZE,
@@ -3828,7 +3828,7 @@ abort_with_firmware:
 abort_with_ioremap:
        iounmap(mgp->sram);
 
-abort_with_wc:
+abort_with_mtrr:
 #ifdef CONFIG_MTRR
        if (mgp->mtrr >= 0)
                mtrr_del(mgp->mtrr, mgp->iomem_base, mgp->board_span);