Seems to fix the original issue, didn't notice any problems. :)
#define GLUE1551_ALARM_TICKS_ON 50 Looks like quite a bit of overhead for doing nothing. Best would be not to run any of that 1551 glue stuff on non-1551, of course, but this looks like a lot of drive model checks in the plus4drive.c area, rather than just that one extra check i proposed.
A generalised "turn off all interrupt sources, CLI and wait for a bit" test seems like a good idea to catch a regression on this, of course.
A generalised "turn off all interrupt source, CLI and wait for a bit" test seems like a good idea to catch a regression on this, of course.
It's also a lot of work. =)
Should only exist in xplus4, as the glue1551 stuff seems to be executed via plus4drive.c only. As for a simple test case, it's never so simple with drive stuff. :) Would loader test binaries with and without watchdog enabled suffice? The one with watchdog interrupts enabled crashes without this patch and doesn't crash with it, while the one with watchdog disabled does not crash in either case.
Spurious interrupts on non-1551 drives
But here you go.