linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com>
To: Greg KH <greg@kroah.com>
Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>,
	Breno Leitao <leitao@linux.vnet.ibm.com>,
	Alan Cox <alan@linux.intel.com>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	Breno Leitao <brenohl@br.ibm.com>
Subject: [PATCH] jsm: Fixed EEH recovery error
Date: Mon,  9 Jan 2012 10:58:06 -0200	[thread overview]
Message-ID: <1326113886-10830-1-git-send-email-lucaskt@linux.vnet.ibm.com> (raw)

There was an error on the jsm driver that would cause it to be unable to
recover after a second error is detected.

At the first error, the device recovers properly:

[72521.485691] EEH: Detected PCI bus error on device 0003:02:00.0
[72521.485695] EEH: This PCI device has failed 1 times in the last hour:
...
[72532.035693] ttyn3 at MMIO 0x0 (irq = 49) is a jsm
[72532.105689] jsm: Port 3 added

However, at the second error, it cascades until EEH disables the device:

[72631.229549] Call Trace:
...
[72641.725687] jsm: Port 3 added
[72641.725695] EEH: Detected PCI bus error on device 0003:02:00.0
[72641.725698] EEH: This PCI device has failed 3 times in the last hour:

It was caused because the PCI state was not being saved after the first
restore. Therefore, at the second recovery the PCI state would not be
restored.

Signed-off-by: Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com>
Signed-off-by: Breno Leitao <brenohl@br.ibm.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> 
---
 drivers/tty/serial/jsm/jsm_driver.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm_driver.c b/drivers/tty/serial/jsm/jsm_driver.c
index 7c867a0..7545fe1 100644
--- a/drivers/tty/serial/jsm/jsm_driver.c
+++ b/drivers/tty/serial/jsm/jsm_driver.c
@@ -251,6 +251,7 @@ static void jsm_io_resume(struct pci_dev *pdev)
 	struct jsm_board *brd = pci_get_drvdata(pdev);
 
 	pci_restore_state(pdev);
+	pci_save_state(pdev);
 
 	jsm_uart_port_init(brd);
 }
-- 
1.7.4.4


             reply	other threads:[~2012-01-09 12:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09 12:58 Lucas Kannebley Tavares [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-03 16:52 [PATCH] jsm: Fixed EEH recovery error Lucas Kannebley Tavares
     [not found] <1315834565-9280-1-git-send-email-lucaskt@linux.vnet.ibm.com>
2011-09-12 15:31 ` Breno Leitao
2011-09-12 15:35 ` Thadeu Lima de Souza Cascardo
2012-01-06 20:43   ` Lucas Kannebley Tavares
2012-01-06 21:04     ` Greg KH

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=1326113886-10830-1-git-send-email-lucaskt@linux.vnet.ibm.com \
    --to=lucaskt@linux.vnet.ibm.com \
    --cc=alan@linux.intel.com \
    --cc=brenohl@br.ibm.com \
    --cc=cascardo@linux.vnet.ibm.com \
    --cc=greg@kroah.com \
    --cc=leitao@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@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;
as well as URLs for NNTP newsgroup(s).