From 11529bae0029e7484267df5b331ace754e689e56 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 10 Oct 1995 09:52:55 +0000 Subject: PCCARD support. --- sys/pccard/pccard.c | 11 ++++++----- sys/pccard/pcic.c | 7 +++++-- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'sys/pccard') diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 9f0af42..ae5ca49 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -402,15 +402,12 @@ unsigned int mask; if (!(mask & imask)) continue; printf("IRQ=%d\n",irq); + if (maskp) + INTRMASK (*maskp, mask); if (register_intr(irq, 0, 0, hand, maskp, unit)==0) { printf("IRQ=%d yes!\n",irq); - if (maskp) - INTRMASK (*maskp, mask); - update_intr_masks(); - - INTREN (mask); return(irq); } } @@ -464,6 +461,9 @@ int err, irq = 0, s; */ else { +/* XXX ED.C +dp->imask = &net_imask; +*/ irq = pccard_alloc_intr(drvp->irqmask, slot_irq_handler, (int)sp, dp->imask); if (irq < 0) @@ -509,6 +509,7 @@ int err, irq = 0, s; remove_device(devp); else devp->running = 1; + INTREN (1 << irq); return(err); } static void diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index d03e10b..56c0a7d 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -291,8 +291,10 @@ int reg = mp->window * PCIC_MEMSIZE + PCIC_MEMBASE; putw (cp, reg, sys_addr & 0xFFF); putw (cp, reg+2, (sys_addr + (mp->size >> 12) - 1) & 0xFFF); putw (cp, reg+4, ((mp->card >> 12) - sys_addr) & 0x3FFF); -#if 1 - printf("card offs = 0x%x, sys_addr = 0x%x\n", ((mp->card >> 12) - sys_addr) & 0x3FFF, sys_addr); +#if 0 + printf("card offs = card_adr = 0x%x 0x%x, sys_addr = 0x%x\n", + mp->card, ((mp->card >> 12) - sys_addr) & 0x3FFF, + sys_addr); #endif /* * Each 16 bit register has some flags in the upper bits. @@ -558,6 +560,7 @@ unsigned char c; if (pcic_irq < 0) printf("pcic: failed to allocate IRQ\n"); } + INTREN (1 << pcic_irq); /* * Check for a card in this slot. */ -- cgit v1.1