Skip to contentSkip to conversation

patch "mei: me: fix irq number stored in hw struct" added to char-misc-linus

PATCH [email protected] 1 participant 1 message Apr 20, 2020

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

mei: me: fix irq number stored in hw struct

to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From fec874a81b3ec280b91034d892a432fc71fd1522 Mon Sep 17 00:00:00 2001
From: Benjamin Lee <[email protected]>
Date: Fri, 17 Apr 2020 11:45:38 -0700
Subject: mei: me: fix irq number stored in hw struct

Commit 261b3e1f2a01 ("mei: me: store irq number in the hw struct.") stores the irq number in the hw struct before MSI is enabled. This caused a regression for mei_me_synchronize_irq() waiting for the wrong irq number. On my laptop this causes a hang on shutdown. Fix the issue by storing the irq number after enabling MSI.

Fixes 261b3e1f2a01 ("mei: me: store irq number in the hw struct.")
Cc stable <[email protected]>
---
 drivers/misc/mei/pci-me.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/misc/mei/pci-me.c +2 -1
index 3d21c38e2dbb..0c390fe421ad 100644
@@ -203,11 +203,12 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	}
 	hw = to_me_hw(dev);
 	hw->mem_addr = pcim_iomap_table(pdev)[0];
-	hw->irq = pdev->irq;
 	hw->read_fws = mei_me_read_fws;
 
 	pci_enable_msi(pdev);
 
+	hw->irq = pdev->irq;
+
 	 /* request and enable interrupt */
 	irqflags = pci_dev_msi_enabled(pdev) ? IRQF_ONESHOT : IRQF_SHARED;
 
Signature · 1 line
2.26.1