summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrice Goglin <brice@myri.com>2008-07-21 10:26:25 +0200
committerJeff Garzik <jgarzik@redhat.com>2008-07-22 16:09:13 -0400
commitc7f80993a38f0354a8ad821bcd9335b47a464357 (patch)
tree5e62576a1268133fca95eeb0ef61a267a5a5d963
parente454e7e2e3afbcdc002ed55a087a14e8b057519d (diff)
downloadop-kernel-dev-c7f80993a38f0354a8ad821bcd9335b47a464357.zip
op-kernel-dev-c7f80993a38f0354a8ad821bcd9335b47a464357.tar.gz
myri10ge: use ioremap_wc
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>
-rw-r--r--drivers/net/myri10ge/myri10ge.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 3305ce3..3ab0e52 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -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);
OpenPOWER on IntegriCloud