LIBDNUT IRQ: Check if Action is attached before enabling attach IRQ.
@@ -371,6 +371,8 @@ static int hw_attach_action(void *_card, uint32_t action, int flags, int timeout
hw_dnut_mmio_write64(card, SNAP_S_JCR, data);
}
+ hw_dnut_mmio_read64(card, SNAP_S_CSR, &data);
+ if (0xC0 != (data & 0xC0)) {
if (SNAP_CCR_IRQ_ATTACH & card->mode)
rc = hw_wait_irq(_card, 2, timeout_sec);
else {
@@ -386,6 +388,7 @@ static int hw_attach_action(void *_card, uint32_t action, int flags, int timeout
dt = tget_ms() - t0;
}
}
+ }
dnut_trace("%s Exit rc: %d Action Base: 0x%x\n", __func__,
rc, card->action_base);
return rc;
