1.1 --- a/pkg/devices/lib/dma/src/x1600.cc Thu Jun 06 23:57:07 2024 +0200
1.2 +++ b/pkg/devices/lib/dma/src/x1600.cc Fri Jun 07 16:08:15 2024 +0200
1.3 @@ -387,10 +387,15 @@
1.4 bool
1.5 Dma_x1600_channel::wait_for_irq()
1.6 {
1.7 - if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0)))
1.8 - return false;
1.9 + if (l4_is_valid_cap(_irq))
1.10 + {
1.11 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0)))
1.12 + return false;
1.13
1.14 - return !l4_error(l4_irq_receive(_irq, L4_IPC_NEVER)) && _chip->have_interrupt(_channel);
1.15 + return !l4_error(l4_irq_receive(_irq, L4_IPC_NEVER)) && _chip->have_interrupt(_channel);
1.16 + }
1.17 + else
1.18 + return true;
1.19 }
1.20
1.21 // Wait up to the given timeout (in microseconds) for an interrupt request,