From 25522b4ef443a9746f17159ce5944d33cef5b3f5 Mon Sep 17 00:00:00 2001 From: Duncan Barclay Date: Tue, 9 Jan 2001 23:39:32 +0000 Subject: [PATCH] Fix a minor bug that prevents NEWBUS users from setting more than one memory map. The memory window for the PCIC is identifed by the resource id for NEWSBUS drivers. pccardd always uses window 0 and rid 0 when setting maps up. This fix does not affect pccardd's handling of common memory for ed cards. Reviewed by: imp --- sys/pccard/pcic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index df546881ff8..8f1b624a777 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -156,7 +156,7 @@ pcic_memory(struct slot *slt, int win) { struct pcic_slot *sp = slt->cdata; struct mem_desc *mp = &slt->mem[win]; - int reg = mp->window * PCIC_MEMSIZE + PCIC_MEMBASE; + int reg = win * PCIC_MEMSIZE + PCIC_MEMBASE; if (mp->flags & MDF_ACTIVE) { unsigned long sys_addr = (uintptr_t)(void *)mp->start >> 12;