This is a note to let you know that I've just added the patch titled can: kvaser_pciefd: Call request_irq() before enabling interrupts to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: can-kvaser_pciefd-call-request_irq-before-enabling-interrupts.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 84762d8da89d29ba842317eb842973e628c27391 Mon Sep 17 00:00:00 2001 From: Jimmy Assarsson <extja@xxxxxxxxxx> Date: Tue, 16 May 2023 15:43:15 +0200 Subject: can: kvaser_pciefd: Call request_irq() before enabling interrupts From: Jimmy Assarsson <extja@xxxxxxxxxx> commit 84762d8da89d29ba842317eb842973e628c27391 upstream. Make sure the interrupt handler is registered before enabling interrupts. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Jimmy Assarsson <extja@xxxxxxxxxx> Link: https://lore.kernel.org/r/20230516134318.104279-4-extja@xxxxxxxxxx Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/can/kvaser_pciefd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/drivers/net/can/kvaser_pciefd.c +++ b/drivers/net/can/kvaser_pciefd.c @@ -1825,6 +1825,11 @@ static int kvaser_pciefd_probe(struct pc if (err) goto err_teardown_can_ctrls; + err = request_irq(pcie->pci->irq, kvaser_pciefd_irq_handler, + IRQF_SHARED, KVASER_PCIEFD_DRV_NAME, pcie); + if (err) + goto err_teardown_can_ctrls; + iowrite32(KVASER_PCIEFD_SRB_IRQ_DPD0 | KVASER_PCIEFD_SRB_IRQ_DPD1, pcie->reg_base + KVASER_PCIEFD_SRB_IRQ_REG); @@ -1845,11 +1850,6 @@ static int kvaser_pciefd_probe(struct pc iowrite32(KVASER_PCIEFD_SRB_CMD_RDB1, pcie->reg_base + KVASER_PCIEFD_SRB_CMD_REG); - err = request_irq(pcie->pci->irq, kvaser_pciefd_irq_handler, - IRQF_SHARED, KVASER_PCIEFD_DRV_NAME, pcie); - if (err) - goto err_teardown_can_ctrls; - err = kvaser_pciefd_reg_candev(pcie); if (err) goto err_free_irq; Patches currently in stable-queue which might be from extja@xxxxxxxxxx are queue-6.1/can-kvaser_pciefd-call-request_irq-before-enabling-interrupts.patch queue-6.1/can-kvaser_pciefd-set-can_state_stopped-in-kvaser_pciefd_stop.patch queue-6.1/can-kvaser_pciefd-clear-listen-only-bit-if-not-explicitly-requested.patch queue-6.1/can-kvaser_pciefd-empty-srb-buffer-in-probe.patch queue-6.1/can-kvaser_pciefd-disable-interrupts-in-probe-error-path.patch queue-6.1/can-kvaser_pciefd-do-not-send-eflush-command-on-tfd-interrupt.patch