From e1bd49a1e1823eab71c293efd1bd0c9b83c350c9 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Sat, 7 Apr 2007 12:52:27 +0000 Subject: 20070407-1350 more updates from plan 9 pc kernel, and a few unreachable fixes(!) --- os/pc/etherwavelan.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'os/pc/etherwavelan.c') diff --git a/os/pc/etherwavelan.c b/os/pc/etherwavelan.c index 6fa9f250..e76905b5 100644 --- a/os/pc/etherwavelan.c +++ b/os/pc/etherwavelan.c @@ -87,6 +87,7 @@ static struct { int did; } wavelanpci[] = { 0x1260, 0x3873, /* Intersil Prism2.5 */ + 0x1737, 0x0019, /* Linksys WPC-11 untested */ }; static Ctlr *ctlrhead, *ctlrtail; @@ -95,7 +96,7 @@ static void wavelanpciscan(void) { int i; - ulong pa; + void *mem; Pcidev *p; Ctlr *ctlr; @@ -117,13 +118,13 @@ wavelanpciscan(void) ctlr = malloc(sizeof(Ctlr)); ctlr->pcidev = p; - pa = upamalloc(p->mem[0].bar&~0xF, p->mem[0].size, 0); - if(pa == 0){ - print("wavelanpci: %.4ux %.4ux: upamalloc 0x%.8lux %d failed\n", p->vid, p->did, p->mem[0].bar&~0xF, p->mem[0].size); + mem = vmap(p->mem[0].bar&~0xF, p->mem[0].size); + if(mem == nil){ + print("wavelanpci: %.4ux %.4ux: vmap 0x%.8lux %d failed\n", p->vid, p->did, p->mem[0].bar&~0xF, p->mem[0].size); free(ctlr); continue; } - ctlr->mmb = (ushort*)KADDR(pa); + ctlr->mmb = mem; if(ctlrhead != nil) ctlrtail->next = ctlr; else -- cgit v1.2.3