The original version of this patch had a conflict between the two interrupts where the program-viewable interrupt state could be deasserted when it should have been asserted. The new version of this patch resolves that conflict.