These should hopefully fix up the races in gen2-4 page flip support. Kudos to Chris for fixing up my mistakes in the gen4 patch, and for providing a nice comment to explain the logic. Disclaimer: I don't have hardware to test any of this. Currently it has only been tested by Chris.