Commit fec874a8 authored by Benjamin Lee's avatar Benjamin Lee Committed by Greg Kroah-Hartman

mei: me: fix irq number stored in hw struct

Commit 261b3e1f ("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: 261b3e1f ("mei: me: store irq number in the hw struct.")
Signed-off-by: default avatarBenjamin Lee <ben@b1c1l1.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200417184538.349550-1-ben@b1c1l1.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ae83d0b4
...@@ -203,11 +203,12 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -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 = to_me_hw(dev);
hw->mem_addr = pcim_iomap_table(pdev)[0]; hw->mem_addr = pcim_iomap_table(pdev)[0];
hw->irq = pdev->irq;
hw->read_fws = mei_me_read_fws; hw->read_fws = mei_me_read_fws;
pci_enable_msi(pdev); pci_enable_msi(pdev);
hw->irq = pdev->irq;
/* request and enable interrupt */ /* request and enable interrupt */
irqflags = pci_dev_msi_enabled(pdev) ? IRQF_ONESHOT : IRQF_SHARED; irqflags = pci_dev_msi_enabled(pdev) ? IRQF_ONESHOT : IRQF_SHARED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment