From d01f7f6e2bb8577cfb3844c3f9b5de791eea68fb Mon Sep 17 00:00:00 2001 From: itojun Date: Mon, 16 Oct 2000 10:26:41 +0000 Subject: [PATCH] correct memory size to be mapped. PR 11242. --- sys/dev/pcmcia/if_cnw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/pcmcia/if_cnw.c b/sys/dev/pcmcia/if_cnw.c index d399f739ae34..27e9259567c2 100644 --- a/sys/dev/pcmcia/if_cnw.c +++ b/sys/dev/pcmcia/if_cnw.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_cnw.c,v 1.14 2000/10/01 23:32:44 thorpej Exp $ */ +/* $NetBSD: if_cnw.c,v 1.15 2000/10/16 10:26:41 itojun Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -539,15 +539,15 @@ cnw_attach(parent, self, aux) sc->sc_ioh = sc->sc_pcioh.ioh; sc->sc_resource |= CNW_RES_IO; #endif - if (pcmcia_mem_alloc(sc->sc_pf, CNW_MEM_SIZE, &sc->sc_pcmemh) != 0) { - printf(": can't allocate memory\n"); - goto fail; - } #ifndef MEMORY_MAPPED memsize = CNW_MEM_SIZE; #else memsize = CNW_MEM_SIZE + CNW_IOM_SIZE; #endif + if (pcmcia_mem_alloc(sc->sc_pf, memsize, &sc->sc_pcmemh) != 0) { + printf(": can't allocate memory\n"); + goto fail; + } if (pcmcia_mem_map(sc->sc_pf, PCMCIA_WIDTH_MEM8|PCMCIA_MEM_COMMON, CNW_MEM_ADDR, memsize, &sc->sc_pcmemh, &sc->sc_memoff, &sc->sc_memwin) != 0) {