Hi Richard, Richard Procter wrote: > * mc32_interrupt doesn't acquire the spinlock, rendering the critical > sections un-exclusive on SMP. Hmm, you're right here...didn't notice this. But I'm not sure on how we should go here: We go get the hold lock right after 'status=inb(ioaddr+HOST_CMD)', so we can treat the interrupt safely. Although, there are some places that we do "wake_up (lp->event)", which I *think* will sleep (which is wrong), or will trigger the finish of wait_pending (which will try to re-acquire the lcok and will deadlock, which is also wrong). So, yes, we could release the lock right before we wake_up, but I'm not sure if this is the right fix either. Furthermore, if we acquire the lock after the "while (inb..)" statement, we must release the lock, and re-acquire so we can treat tx_ring/rx_ring safely as well...which is damn ugly and probably has many races. Maybe we could get the lock before 'while'? Ideas? > * sleep_on's remain in mc32_halt_transceiver and mc32_close. I think this > could lead to deadlock on UP --- eg. thread sleeps with spinlock held, > subsequent interrupt then waits in vain. Might be less deadly on SMP? > (are interrupt handlers reentrant on SMP?) Neh, that was my fault. I just didn't switch to wait_pending...this is an easy fix. > * Just noticed an old error in mc32_close --- sleep_on is called in > without first disabling interrupts. This is fixed since we have to hold the device lock before calling wait_pending, so it should be fixed too. > I've had a go at testing it, but ran into troubles with the ibmmca.c > driver carking on an uninitialised spinlock. Hopefully, I'll find some > quality time in the weekend to get things going. Great. If all works, then we can push to Linus/Andrew/Jeff Garzik for merging. Attached is the new patch which fixes the latter 2 problems. Feedback welcome. Cheers, Felipe