From: linas@austin.ibm.com (Linas Vepstas)
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: [PATCH 9/11] ppc64: EEH: rm un-needed data
Date: Mon, 19 Mar 2007 14:59:10 -0500 [thread overview]
Message-ID: <20070319195910.GI11532@austin.ibm.com> (raw)
In-Reply-To: <20070319194349.GT5151@austin.ibm.com>
The EEH event notification system passes around data that is
not needed or at least, not used properly. Stop passing this
data; get it in a more reliable fashion.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
----
arch/powerpc/platforms/pseries/eeh.c | 8 +-------
arch/powerpc/platforms/pseries/eeh_driver.c | 16 +++-------------
arch/powerpc/platforms/pseries/eeh_event.c | 6 +-----
include/asm-powerpc/eeh_event.h | 6 +-----
4 files changed, 6 insertions(+), 30 deletions(-)
Index: linux-2.6.21-rc4-git4/arch/powerpc/platforms/pseries/eeh_event.c
===================================================================
--- linux-2.6.21-rc4-git4.orig/arch/powerpc/platforms/pseries/eeh_event.c 2007-02-04 12:44:54.000000000 -0600
+++ linux-2.6.21-rc4-git4/arch/powerpc/platforms/pseries/eeh_event.c 2007-03-19 13:21:49.000000000 -0500
@@ -118,9 +118,7 @@ static void eeh_thread_launcher(struct w
* (from a workqueue).
*/
int eeh_send_failure_event (struct device_node *dn,
- struct pci_dev *dev,
- enum pci_channel_state state,
- int time_unavail)
+ struct pci_dev *dev)
{
unsigned long flags;
struct eeh_event *event;
@@ -144,8 +142,6 @@ int eeh_send_failure_event (struct devic
event->dn = dn;
event->dev = dev;
- event->state = state;
- event->time_unavail = time_unavail;
/* We may or may not be called in an interrupt context */
spin_lock_irqsave(&eeh_eventlist_lock, flags);
Index: linux-2.6.21-rc4-git4/include/asm-powerpc/eeh_event.h
===================================================================
--- linux-2.6.21-rc4-git4.orig/include/asm-powerpc/eeh_event.h 2007-02-04 12:44:54.000000000 -0600
+++ linux-2.6.21-rc4-git4/include/asm-powerpc/eeh_event.h 2007-03-19 13:21:49.000000000 -0500
@@ -30,8 +30,6 @@ struct eeh_event {
struct list_head list;
struct device_node *dn; /* struct device node */
struct pci_dev *dev; /* affected device */
- enum pci_channel_state state; /* PCI bus state for the affected device */
- int time_unavail; /* milliseconds until device might be available */
};
/**
@@ -46,9 +44,7 @@ struct eeh_event {
* (from a workqueue).
*/
int eeh_send_failure_event (struct device_node *dn,
- struct pci_dev *dev,
- enum pci_channel_state state,
- int time_unavail);
+ struct pci_dev *dev);
/* Main recovery function */
struct pci_dn * handle_eeh_events (struct eeh_event *);
Index: linux-2.6.21-rc4-git4/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- linux-2.6.21-rc4-git4.orig/arch/powerpc/platforms/pseries/eeh.c 2007-03-19 13:21:46.000000000 -0500
+++ linux-2.6.21-rc4-git4/arch/powerpc/platforms/pseries/eeh.c 2007-03-19 13:21:49.000000000 -0500
@@ -346,7 +346,6 @@ int eeh_dn_check_failure(struct device_n
int rets[3];
unsigned long flags;
struct pci_dn *pdn;
- enum pci_channel_state state;
int rc = 0;
total_mmio_ffs++;
@@ -452,12 +451,7 @@ int eeh_dn_check_failure(struct device_n
eeh_mark_slot (dn, EEH_MODE_ISOLATED);
spin_unlock_irqrestore(&confirm_error_lock, flags);
- state = pci_channel_io_normal;
- if ((rets[0] == 1) || (rets[0] == 2) || (rets[0] == 4))
- state = pci_channel_io_frozen;
- if (rets[0] == 5)
- state = pci_channel_io_perm_failure;
- eeh_send_failure_event (dn, dev, state, rets[2]);
+ eeh_send_failure_event (dn, dev);
/* Most EEH events are due to device driver bugs. Having
* a stack trace will help the device-driver authors figure
Index: linux-2.6.21-rc4-git4/arch/powerpc/platforms/pseries/eeh_driver.c
===================================================================
--- linux-2.6.21-rc4-git4.orig/arch/powerpc/platforms/pseries/eeh_driver.c 2007-03-19 13:21:35.000000000 -0500
+++ linux-2.6.21-rc4-git4/arch/powerpc/platforms/pseries/eeh_driver.c 2007-03-19 13:21:49.000000000 -0500
@@ -342,13 +342,6 @@ struct pci_dn * handle_eeh_events (struc
return NULL;
}
-#if 0
- /* We may get "permanent failure" messages on empty slots.
- * These are false alarms. Empty slots have no child dn. */
- if ((event->state == pci_channel_io_perm_failure) && (frozen_device == NULL))
- return;
-#endif
-
frozen_pdn = PCI_DN(frozen_dn);
frozen_pdn->eeh_freeze_count++;
@@ -363,12 +356,9 @@ struct pci_dn * handle_eeh_events (struc
if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
goto excess_failures;
- /* If the reset state is a '5' and the time to reset is 0 (infinity)
- * or is more then 15 seconds, then mark this as a permanent failure.
- */
- if ((event->state == pci_channel_io_perm_failure) &&
- ((event->time_unavail <= 0) ||
- (event->time_unavail > MAX_WAIT_FOR_RECOVERY*1000))) {
+ /* Get the current PCI slot state. */
+ rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
+ if (rc < 0) {
printk(KERN_WARNING "EEH: Permanent failure\n");
goto hard_fail;
}
next prev parent reply other threads:[~2007-03-19 19:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 19:43 [PATCH 0/11] ppc64: EEH: modifications, fixes Linas Vepstas
2007-03-19 19:51 ` [PATCH 1/11] ppc64: EEH: modify order of EEH state checking Linas Vepstas
2007-03-19 19:52 ` [PATCH 2/11] ppc64: EEH: Add clarifying messages Linas Vepstas
2007-03-20 18:26 ` Brian King
2007-03-21 17:59 ` Linas Vepstas
2007-03-19 19:53 ` [PATCH 3/11] ppc64: EEH: Tolerate high mmio Linas Vepstas
2007-03-21 1:25 ` Olof Johansson
2007-03-21 19:20 ` Linas Vepstas
2007-03-19 19:54 ` [PATCH 4/11] ppc64: EEH: support ibm,get-config-addr-info2 RTAS call Linas Vepstas
2007-03-19 19:55 ` [PATCH 5/11] ppc64: EEH: hotplug recovery bugfix Linas Vepstas
2007-03-19 19:55 ` [PATCH 6/11] ppc64: EEH: multifunction " Linas Vepstas
2007-03-19 19:56 ` [PATCH 7/11] ppc64: EEH: handle reset state high Linas Vepstas
2007-03-19 19:58 ` [PATCH 8/11] ppc64: EEH: wait for slot status Linas Vepstas
2007-03-19 19:59 ` Linas Vepstas [this message]
2007-03-19 19:59 ` [PATCH 10/11] ppc64: EEH: verify state change Linas Vepstas
2007-03-19 20:01 ` [PATCH 11/11] ppc64: EEH: restructure multi-function support Linas Vepstas
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=20070319195910.GI11532@austin.ibm.com \
--to=linas@austin.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).