From 4d69a9d06187ba2e16175b44dfe4ec62bff8b412 Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Sun, 17 Jun 2007 00:09:51 +0000 Subject: [PATCH] Also mark writecombine as enabled when PAT is used to enable it rather than MTRRs. --- sys/dev/mxge/if_mxge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c index f41576e5f5cb..786a245f8ae8 100644 --- a/sys/dev/mxge/if_mxge.c +++ b/sys/dev/mxge/if_mxge.c @@ -154,6 +154,7 @@ mxge_enable_wc(mxge_softc_t *sc) vm_offset_t len; int err, action; + sc->wc = 1; len = rman_get_size(sc->mem_res); #if defined(__i386) || defined(__amd64) err = pmap_change_attr((vm_offset_t) sc->sram, @@ -172,11 +173,10 @@ mxge_enable_wc(mxge_softc_t *sc) strcpy((char *)&mrdesc.mr_owner, "mxge"); err = mem_range_attr_set(&mrdesc, &action); if (err != 0) { + sc->wc = 0; device_printf(sc->dev, "w/c failed for pa 0x%lx, len 0x%lx, err = %d\n", (unsigned long)pa, (unsigned long)len, err); - } else { - sc->wc = 1; } }