Skip to content

m68k/atari - ide: do not register interrupt if host->get_lock is set

Michael Schmitz linux-m68k 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 1 patch 0 repliesNew

Patches in v1 No applies recorded yet

The patch the cover letter announces is not in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] m68k/atari - ide: do not register interrupt if host->get_lock is set

Geert,

as hinted in my earlier patch series, this one bit me while debugging the SCSI/IDE deadlock on my Falcon.

On Falcon, registering the IDE interrupt handler is taken care of by registering stdma_int() in the arch setup code, then passing the relevant IDE interrupt handler as argument to stdma_lock(). This ensures that the IDE inthandler is only called if IDE has acquired the ST-DMA lock, and avoids the IDE handler stepping on the SCSI handlers' toes if the ST-DMA is locked by SCSI.

At some point in the past, the IDE interrupt was registered unconditionally even on m68k, resulting in both stdma_int() and ide_interrupt() being registered, again opening up the potential of IDE taking interrupts meant to be handled by SCSI (or floppy). This might result in deadlocking the SCSI driver if IDE releases the ST-DMA lock in error.

The next patch changes the IDE core to only register the IDE handler if host->get_lock is not set - AFAIK m68k is the sole user of host->get_lock so we can rely on IDE interrupts being handled through the multiplexer whenever host->get_lock happens to be set.

Cheers,

Michael