From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Tomas Winkler <tomas.winkler@intel.com>,
Alexander Usyskin <alexander.usyskin@intel.com>
Subject: [PATCH 3.14 09/19] mei: me: fix hw ready reset flow
Date: Thu, 12 Jun 2014 16:21:46 -0700 [thread overview]
Message-ID: <20140612232139.014005758@linuxfoundation.org> (raw)
In-Reply-To: <20140612232138.561318739@linuxfoundation.org>
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomas Winkler <tomas.winkler@intel.com>
commit b04ada92ffaabb868497a1fce8e4f6bf74e5488f upstream.
We cleared H_RST for H_CSR on spurious interrupt generated when ME_RDY
while cleared and not while ME_RDY is set. The spurious interrupt
is not delivered on all platforms in this case the
driver may fail to initialize.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/misc/mei/hw-me.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -164,6 +164,9 @@ static void mei_me_hw_reset_release(stru
hcsr |= H_IG;
hcsr &= ~H_RST;
mei_hcsr_set(hw, hcsr);
+
+ /* complete this write before we set host ready on another CPU */
+ mmiowb();
}
/**
* mei_me_hw_reset - resets fw via mei csr register.
@@ -201,6 +204,7 @@ static int mei_me_hw_reset(struct mei_de
static void mei_me_host_set_ready(struct mei_device *dev)
{
struct mei_me_hw *hw = to_me_hw(dev);
+ hw->host_hw_state = mei_hcsr_read(hw);
hw->host_hw_state |= H_IE | H_IG | H_RDY;
mei_hcsr_set(hw, hw->host_hw_state);
}
@@ -491,14 +495,13 @@ irqreturn_t mei_me_irq_thread_handler(in
/* check if we need to start the dev */
if (!mei_host_is_ready(dev)) {
if (mei_hw_is_ready(dev)) {
+ mei_me_hw_reset_release(dev);
dev_dbg(&dev->pdev->dev, "we need to start the dev.\n");
dev->recvd_hw_ready = true;
wake_up_interruptible(&dev->wait_hw_ready);
} else {
-
- dev_dbg(&dev->pdev->dev, "Reset Completed.\n");
- mei_me_hw_reset_release(dev);
+ dev_dbg(&dev->pdev->dev, "Spurious Interrupt\n");
}
goto end;
}
next prev parent reply other threads:[~2014-06-12 23:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 23:21 [PATCH 3.14 00/19] 3.14.8-stable review Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 01/19] fs,userns: Change inode_capable to capable_wrt_inode_uidgid Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 02/19] netfilter: ipv4: defrag: set local_df flag on defragmented skb Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 03/19] MIPS: asm: thread_info: Add _TIF_SECCOMP flag Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 04/19] Target/iscsi,iser: Avoid accepting transport connections during stop stage Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 05/19] iser-target: Fix multi network portal shutdown regression Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 06/19] target: Allow READ_CAPACITY opcode in ALUA Standby access state Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 07/19] auditsc: audit_krule mask accesses need bounds checking Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 08/19] PCI/MSI: Fix memory leak in free_msi_irqs() Greg Kroah-Hartman
2014-06-12 23:21 ` Greg Kroah-Hartman [this message]
2014-06-12 23:21 ` [PATCH 3.14 10/19] mei: me: drop harmful wait optimization Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 11/19] mei: me: read H_CSR after asserting reset Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 13/19] [media] rtl28xxu: add USB ID for Genius TVGo DVB-T03 Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 14/19] [media] rtl28xxu: add chipset version comments into device list Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 15/19] [media] rtl28xxu: add 1b80:d395 Peak DVB-T USB Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 16/19] [media] rtl28xxu: add [1b80:d39d] Sveon STV20 Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 17/19] [media] rtl28xxu: add [1b80:d3af] Sveon STV27 Greg Kroah-Hartman
2014-06-13 5:47 ` [PATCH 3.14 00/19] 3.14.8-stable review Guenter Roeck
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=20140612232139.014005758@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=alexander.usyskin@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tomas.winkler@intel.com \
/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