LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [char-misc 1/2 3.19] mei: mask interrupt set bit on clean reset bit
@ 2015-01-25 21:45 Tomas Winkler
  2015-01-25 21:45 ` [char-misc 2/2 3.19] mei: me: release hw from reset only during the reset flow Tomas Winkler
  0 siblings, 1 reply; 2+ messages in thread
From: Tomas Winkler @ 2015-01-25 21:45 UTC (permalink / raw)
  To: gregkh; +Cc: arnd, linux-kernel, Alexander Usyskin, stable, Tomas Winkler

From: Alexander Usyskin <alexander.usyskin@intel.com>

We should mask interrupt set bit when writing back
hcsr value in reset bit clean-up.

This is refinement for
mei: clean reset bit before reset
commit b13a65ef190e488e2761d65bdd2e1fe8a3a125f5

Cc: <stable@vger.kernel.org> #3.10+
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/hw-me.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index 06ff0a2ec960..ccc1b405ca21 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -242,7 +242,7 @@ static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
 	if ((hcsr & H_RST) == H_RST) {
 		dev_warn(dev->dev, "H_RST is set = 0x%08X", hcsr);
 		hcsr &= ~H_RST;
-		mei_me_reg_write(hw, H_CSR, hcsr);
+		mei_hcsr_set(hw, hcsr);
 		hcsr = mei_hcsr_read(hw);
 	}
 
-- 
1.9.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [char-misc 2/2 3.19] mei: me: release hw from reset only during the reset flow
  2015-01-25 21:45 [char-misc 1/2 3.19] mei: mask interrupt set bit on clean reset bit Tomas Winkler
@ 2015-01-25 21:45 ` Tomas Winkler
  0 siblings, 0 replies; 2+ messages in thread
From: Tomas Winkler @ 2015-01-25 21:45 UTC (permalink / raw)
  To: gregkh; +Cc: arnd, linux-kernel, Alexander Usyskin, stable, Tomas Winkler

From: Alexander Usyskin <alexander.usyskin@intel.com>

We might enter the interrupt handler with hw_ready already set,
but prior we actually started the reset flow.
To soleve this we move the reset release from the interrupt handler
to the HW start wait function which is part of the reset sequence.

Cc: <stable@vger.kernel.org> #3.10+
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/hw-me.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index ccc1b405ca21..f8fd503dfbd6 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -335,6 +335,7 @@ static int mei_me_hw_ready_wait(struct mei_device *dev)
 		return -ETIME;
 	}
 
+	mei_me_hw_reset_release(dev);
 	dev->recvd_hw_ready = false;
 	return 0;
 }
@@ -731,9 +732,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
 	/*  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->dev, "we need to start the dev.\n");
-
 			dev->recvd_hw_ready = true;
 			wake_up(&dev->wait_hw_ready);
 		} else {
-- 
1.9.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-25 21:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-25 21:45 [char-misc 1/2 3.19] mei: mask interrupt set bit on clean reset bit Tomas Winkler
2015-01-25 21:45 ` [char-misc 2/2 3.19] mei: me: release hw from reset only during the reset flow Tomas Winkler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).