--- ./pccard.c.ORG Mon May 25 18:27:48 1998 +++ ./pccard.c Wed Jun 24 21:31:49 1998 @@ -387,7 +387,12 @@ if (devi->running) { s = splhigh(); - devi->drv->disable(devi); + /*kura + * 'running' is equal to 2 when an IRQ has been mapped and + * the device enable function has returned an error. + */ + if(devi->running != 2) + devi->drv->disable(devi); devi->running = 0; if (devi->isahd.id_irq && --slt->irqref <= 0) { printf("Return IRQ=%d\n",slt->irq); @@ -688,8 +693,11 @@ * the error. We assume that when we free the device, * it will also set 'running' to off. */ - if (err) + if (err) { + /*kura*/ + devi->running = 2; remove_device(devi); + } return(err); }