diff -Naur linux-2.4.22-pre6/drivers/scsi/aha152x.c linux-2.4.22-bpd/drivers/scsi/aha152x.c --- linux-2.4.22-pre6/drivers/scsi/aha152x.c 2003-06-13 08:51:36.000000000 -0600 +++ linux-2.4.22-bpd/drivers/scsi/aha152x.c 2003-07-15 14:38:27.000000000 -0600 @@ -1936,6 +1936,23 @@ return; } + /* + * Read a couple of registers that are known to not be all 1's. If + * we read all 1's (-1), that means that either: + * a. The host adapter chip has gone bad, and we cannot control it, + * OR + * b. The host adapter is a PCMCIA card that has been ejected + * In either case, we cannot do anything with the host adapter at + * this point in time. So just ignore the interrupt and return. + * In the latter case, the interrupt might actually be meant for + * someone else sharing this IRQ, and that driver will handle it + */ + rev = GETPORT(REV); + dmacntrl0 = GETPORT(DMACNTRL0); + if ((rev == 0xFF) && (dmacntrl0 == 0xFF)) { + return; + } + /* no more interrupts from the controller, while we're busy. INTEN is restored by the BH handler */ CLRBITS(DMACNTRL0, INTEN); diff -Naur linux-2.4.22-pre6/drivers/scsi/pcmcia/aha152x_stub.c linux-2.4.22-bpd/drivers/scsi/pcmcia/aha152x_stub.c --- linux-2.4.22-pre6/drivers/scsi/pcmcia/aha152x_stub.c 2001-12-21 10:41:55.000000000 -0700 +++ linux-2.4.22-bpd/drivers/scsi/pcmcia/aha152x_stub.c 2003-07-15 14:41:20.000000000 -0600 @@ -244,6 +244,11 @@ /* Configure card */ driver_template.module = &__this_module; + /* + * Don't use the SCSI error handling thread. This causes schedule() to + * be called from the timer_bh when the AHA152x card is ejected + */ + driver_template.use_new_eh_code = 0; link->state |= DEV_CONFIG; tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;