net,can: fix sja1000 IER behavior
PATCH 1/1 net,can: fix sja1000 IER behavior
Without this patch disabling interrupts throughIER (Interrupt Enable Register) doesn't work,because interrupt status is changed only onnext SJA_CMR write or SJA_IR reading.This behavior doesn't affect Linux kernelbecause handling is done into interruptcontext, not in bottom half.I tried to use bottom half and got interruptstorm after masking IRQ.So this patch fixes that behavior. Signed-off-by: Alexey Kaptur <[email protected]>---- hw/net/can/can_sja1000.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/can/can_sja1000.c b/hw/net/can/can_sja1000.cindex 73201f9139..bfab14de10 100644--- a/hw/net/can/can_sja1000.c+++ b/hw/net/can/can_sja1000.c@@ -541,6 +541,7 @@ void can_sja_mem_write(CanSJA1000State *s, hwaddr addr, uint64_t val, break; /* Do nothing */ case SJA_IER: /* Interrupt enable register */ s->interrupt_en = val;+ can_sja_update_pel_irq(s); break; case 16: /* RX frame information addr16-28. */ s->status_pel |= (1 << 5); /* Set transmit status. */--2.25.1