summaryrefslogtreecommitdiff
path: root/os/pc/etherwavelan.c
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2007-04-07 12:52:27 +0000
committerCharles.Forsyth <devnull@localhost>2007-04-07 12:52:27 +0000
commite1bd49a1e1823eab71c293efd1bd0c9b83c350c9 (patch)
treea9424cde16004cb9e591045225bc61beed339dd5 /os/pc/etherwavelan.c
parent15345f9c75c069d3e2e362af5d6f931eef7772ef (diff)
20070407-1350 more updates from plan 9 pc kernel, and a few unreachable fixes(!)
Diffstat (limited to 'os/pc/etherwavelan.c')
-rw-r--r--os/pc/etherwavelan.c11
1 files changed, 6 insertions, 5 deletions
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