Move UART IRQ enable after USB init We enable the UART interrupt super early, way before we can actually handle anything. That's no good. Move the enablement after the FUSB init, unless we deal with an serial upstream. Signed-off-by: Marc Zyngier <maz@kernel.org>
diff --git a/start.c b/start.c index 10c6692..8bcc75e 100644 --- a/start.c +++ b/start.c
@@ -206,7 +206,6 @@ uart_set_hw_flow(hw->uart, false, false); uart_set_fifo_enabled(hw->uart, true); irq_set_exclusive_handler(hw->uart_irq, hw->uart_handler); - irq_set_enabled(hw->uart_irq, true); uart_set_irq_enables(hw->uart, true, false); /* Interrupt when the RX FIFO is 3/4 full */ @@ -357,7 +356,9 @@ { if (serial) { upstream_ops = &serial1_upstream_ops; + irq_set_enabled(hw1.uart_irq, true); } else { + irq_set_enabled(hw1.uart_irq, false); upstream_ops = &usb_upstream_ops; }
diff --git a/vdmtool.c b/vdmtool.c index db415b9..a9d73bc 100644 --- a/vdmtool.c +++ b/vdmtool.c
@@ -708,6 +708,8 @@ evt_disconnect(cxt); debug_poke(cxt); + + irq_set_enabled(hw->uart_irq, true); } static bool m1_pd_bmc_run_one(struct vdm_context *cxt)