From: "Winkler, Tomas" <tomas.winkler@intel.com>
To: Benjamin Lee <ben@b1c1l1.com>,
"Usyskin, Alexander" <alexander.usyskin@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] mei: me: fix irq number stored in hw struct
Date: Sat, 18 Apr 2020 07:20:02 +0000 [thread overview]
Message-ID: <8a9bad577d4e4b019cb22e7e59f742b2@intel.com> (raw)
In-Reply-To: <20200417184538.349550-1-ben@b1c1l1.com>
> 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.
Thanks a lot for cracking this down, this should go to stable (5.5) as well.
We should be probably calling hw->irq = pci_irq_vector(pdev, 0); as pci_enable_msi was deprecated.
Will try to address this in a follow up patch.
> Fixes: 261b3e1f2a01 ("mei: me: store irq number in the hw struct.")
> Signed-off-by: Benjamin Lee <ben@b1c1l1.com>
> ---
> drivers/misc/mei/pci-me.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c index
> 3d21c38e2dbb..0c390fe421ad 100644
> --- a/drivers/misc/mei/pci-me.c
> +++ b/drivers/misc/mei/pci-me.c
> @@ -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;
>
> --
> 2.26.1
prev parent reply other threads:[~2020-04-18 7:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 18:45 Benjamin Lee
2020-04-18 7:20 ` Winkler, Tomas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8a9bad577d4e4b019cb22e7e59f742b2@intel.com \
--to=tomas.winkler@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=ben@b1c1l1.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®