There are several points in the code where GPIO registers are read, various operations are performed with the result, then GPIO registers are written back to. The problem here is that there is nothing preventing other access occuring between the read and the write. Some parts of the code (IIC) go one step further and use Giant as a lock around these accesses, but as it is not done globally, this makes little difference. I stumbled on this while writing a driver for the NSLU LEDs, while hammering the driver I saw interrupts being missed. Whilst I have no absolute proof that this is the cause, I've not been able to recreate it with this patch in place. I've gone for a seperate spin lock for the GPIO pins as it is used in various contexts where a spin lock seems to be the correct choice. It's also implemented as a global lock rather than being stored in a softc or similar - until there is a GPIO driver, I can't see any better solution. Something like this is probably also needed for the other arm platforms, however I do not have the hardware required to test these. How-To-Repeat: (ab)use code paths that toggle GPIO lines (e.g. use IIC heavily while USB generates interrupts)
State Changed From-To: open->patched Equivalent patch committed in r215319
State Changed From-To: patched->closed This can now be closed, an equivalent patch was committed some time ago.