From: Wei Yang <weiyang@linux.vnet.ibm.com>
To: gwshan@linux.vnet.ibm.com
Cc: Wei Yang <weiyang@linux.vnet.ibm.com>, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 3/4] powerpc/eeh: fix powernv_eeh_wait_state delay logic
Date: Mon, 9 Mar 2015 11:17:31 +0800 [thread overview]
Message-ID: <1425871052-13118-4-git-send-email-weiyang@linux.vnet.ibm.com> (raw)
In-Reply-To: <1425871052-13118-1-git-send-email-weiyang@linux.vnet.ibm.com>
As the comment indicates, powernv_eeh_get_state() will inform EEH core to
delay 1 second. This means the delay doesn't happen when
powernv_eeh_get_state() returns.
This patch moves the delay subtraction just before msleep(), which is the
same logic in pseries_eeh_wait_state().
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/eeh-powernv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
index 5abb4c2..af1be8f 100644
--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
@@ -334,13 +334,13 @@ static int powernv_eeh_wait_state(struct eeh_pe *pe, int max_wait)
if (ret != EEH_STATE_UNAVAILABLE)
return ret;
- max_wait -= mwait;
if (max_wait <= 0) {
pr_warn("%s: Timeout getting PE#%x's state (%d)\n",
__func__, pe->addr, max_wait);
return EEH_STATE_NOT_SUPPORT;
}
+ max_wait -= mwait;
msleep(mwait);
}
--
1.7.9.5
next prev parent reply other threads:[~2015-03-09 3:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 3:17 [PATCH 0/4] EEH Cleanup Wei Yang
2015-03-09 3:17 ` [PATCH 1/4] powerpc/eeh: fix start/end/flags type in struct pci_io_addr_range{} Wei Yang
2015-03-11 5:18 ` Gavin Shan
2015-03-09 3:17 ` [PATCH 2/4] powerpc/eeh: fix comment for wait_state() Wei Yang
2015-03-11 5:17 ` Gavin Shan
2015-03-09 3:17 ` Wei Yang [this message]
2015-03-11 5:13 ` [PATCH 3/4] powerpc/eeh: fix powernv_eeh_wait_state delay logic Gavin Shan
2015-03-11 5:47 ` Wei Yang
2015-03-09 3:17 ` [PATCH 4/4] powerpc/eeh: remove unused macro IS_BRIDGE Wei Yang
2015-03-11 5:07 ` Gavin Shan
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=1425871052-13118-4-git-send-email-weiyang@linux.vnet.ibm.com \
--to=weiyang@linux.vnet.ibm.com \
--cc=gwshan@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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).