diff -r bd4631c70392 -r bf7c62bc533f devices/e100-2.6.20-ethercat.c --- a/devices/e100-2.6.20-ethercat.c Thu Nov 06 15:46:40 2008 +0000 +++ b/devices/e100-2.6.20-ethercat.c Thu Nov 06 15:55:49 2008 +0000 @@ -1642,17 +1642,17 @@ mii_check_link(&nic->mii); - /* Software generated interrupt to recover from (rare) Rx - * allocation failure. - * Unfortunately have to use a spinlock to not re-enable interrupts - * accidentally, due to hardware that shares a register between the - * interrupt mask bit and the SW Interrupt generation bit */ - if (!nic->ecdev) + if (!nic->ecdev) { + /* Software generated interrupt to recover from (rare) Rx + * allocation failure. + * Unfortunately have to use a spinlock to not re-enable interrupts + * accidentally, due to hardware that shares a register between the + * interrupt mask bit and the SW Interrupt generation bit */ spin_lock_irq(&nic->cmd_lock); - writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); - e100_write_flush(nic); - if (!nic->ecdev) + writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); + e100_write_flush(nic); spin_unlock_irq(&nic->cmd_lock); + } e100_update_stats(nic); e100_adjust_adaptive_ifs(nic, cmd.speed, cmd.duplex);