mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH for v3.5 1/2] misc: mei: Disable MSI when IRQ registration fails
@ 2012-06-11  9:18 Tomas Winkler
  2012-06-11  9:18 ` [PATCH for v3.5 2/2] misc: mei: set WDIOF_ALARMONLY on mei watchdog Tomas Winkler
  0 siblings, 1 reply; 2+ messages in thread
From: Tomas Winkler @ 2012-06-11  9:18 UTC (permalink / raw)
  To: gregkh; +Cc: alan, devel, linux-kernel, Samuel Ortiz, Tomas Winkler

From: Samuel Ortiz <sameo@linux.intel.com>

Since MSI is enabled right before that, we should disable it when
registration fails.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index a5a17e7..7de1389 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
 	if (err) {
 		dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n",
 		       pdev->irq);
-		goto unmap_memory;
+		goto disable_msi;
 	}
 	INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
 	if (mei_hw_init(dev)) {
@@ -1023,8 +1023,8 @@ release_irq:
 	mei_disable_interrupts(dev);
 	flush_scheduled_work();
 	free_irq(pdev->irq, dev);
+disable_msi:
 	pci_disable_msi(pdev);
-unmap_memory:
 	pci_iounmap(pdev, dev->mem_addr);
 free_device:
 	kfree(dev);
-- 
1.7.4.4


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

* [PATCH for v3.5 2/2] misc: mei: set WDIOF_ALARMONLY on mei watchdog
  2012-06-11  9:18 [PATCH for v3.5 1/2] misc: mei: Disable MSI when IRQ registration fails Tomas Winkler
@ 2012-06-11  9:18 ` Tomas Winkler
  0 siblings, 0 replies; 2+ messages in thread
From: Tomas Winkler @ 2012-06-11  9:18 UTC (permalink / raw)
  To: gregkh; +Cc: alan, devel, linux-kernel, Tomas Winkler

mei watchdog doesn't reboot the system it only produces event
therefore mark it as WDIOF_ALARMONLY.

This patch depends on:
commit 2bbeed016dd96045ec82c3a309afddcc3a0db1d2
Author: Alan Cox <alan@linux.intel.com>
watchdog: Add a flag to indicate the watchdog doesn't reboot things

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/wd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c
index 6be5605..e2ec050 100644
--- a/drivers/misc/mei/wd.c
+++ b/drivers/misc/mei/wd.c
@@ -341,7 +341,7 @@ static const struct watchdog_ops wd_ops = {
 };
 static const struct watchdog_info wd_info = {
 		.identity = INTEL_AMT_WATCHDOG_ID,
-		.options = WDIOF_KEEPALIVEPING,
+		.options = WDIOF_KEEPALIVEPING | WDIOF_ALARMONLY,
 };
 
 static struct watchdog_device amt_wd_dev = {
-- 
1.7.4.4


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

end of thread, other threads:[~2012-06-11  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-11  9:18 [PATCH for v3.5 1/2] misc: mei: Disable MSI when IRQ registration fails Tomas Winkler
2012-06-11  9:18 ` [PATCH for v3.5 2/2] misc: mei: set WDIOF_ALARMONLY on mei watchdog Tomas Winkler

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®