From a40d138535d4ea4d66c04c7538840eba84383aeb Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 1 Dec 2000 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2000-12-01 --- bitsy/devpcmcia.c | 16 +++++++++++----- port/devpipe.c | 2 -- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/bitsy/devpcmcia.c b/bitsy/devpcmcia.c index 4f3c5ec8b37282ee11401bd942c108fd781072bb..94b92af394ed0421dd78f9c985795cfa25d58307 100644 --- a/bitsy/devpcmcia.c +++ b/bitsy/devpcmcia.c @@ -300,13 +300,19 @@ slotinfo(Ureg*, void*) slot[0].occupied = 0; slot[1].occupied = 0; } else { - if(!slot[0].occupied && (x & GPIO_CARD_IND0_i)){ + if(x & GPIO_CARD_IND0_i){ + slot[0].occupied = 0; + slot[0].cisread = 0; + } else if(slot[0].occupied == 0){ slot[0].occupied = 1; slot[0].cisread = 0; } - if(!slot[1].occupied && (x & GPIO_CARD_IND1_i)){ + if(x & GPIO_CARD_IND1_i){ + slot[1].occupied = 0; + slot[1].cisread = 0; + } else if(slot[1].occupied == 0){ slot[1].occupied = 1; - slot[0].cisread = 0; + slot[1].cisread = 0; } } } @@ -350,14 +356,14 @@ slotmap(int slotno, ulong regs, ulong attr, ulong mem) pp->mem = mapmem(mem, 64*OneMeg, 0); pp->memmap.ca = 0; pp->memmap.cea = 64*MB; - pp->memmap.isa = (ulong)pp->mem; + pp->memmap.isa = (ulong)mem; pp->memmap.len = 64*OneMeg; pp->memmap.attr = 0; pp->attr = mapmem(attr, OneMeg, 0); pp->attrmap.ca = 0; pp->attrmap.cea = MB; - pp->attrmap.isa = (ulong)pp->attr; + pp->attrmap.isa = (ulong)attr; pp->attrmap.len = OneMeg; pp->attrmap.attr = 1; diff --git a/port/devpipe.c b/port/devpipe.c index c5f29e117a6fb0d0a5a6df22bfa59c9ccb82c167..991479e2e24e6135db3bee94c64dd5190e22d81b 100644 --- a/port/devpipe.c +++ b/port/devpipe.c @@ -122,8 +122,6 @@ pipegen(Chan *c, Dirtab *tab, int ntab, int i, Dir *dp) } id = NETID(c->qid.path); - if(i > 1) - id++; if(tab==0 || i>=ntab) return -1; tab += i;