aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-03-19 15:59:10 -0400
committerPaul Mackerras <paulus@samba.org>2007-03-22 07:52:55 -0400
commitd0ab95ca9854174029cef2f08acf1859441cb547 (patch)
tree6913da5128d2a5b6a823836fdfbaaad56d96d840 /arch
parent9c547768e7d9f456f1b145102e75f79e30f7b709 (diff)
[POWERPC] EEH: rm un-needed data
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> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c8
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c16
-rw-r--r--arch/powerpc/platforms/pseries/eeh_event.c6
3 files changed, 5 insertions, 25 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index c4604f71c962..1d05c9b55605 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -346,7 +346,6 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
346 int rets[3]; 346 int rets[3];
347 unsigned long flags; 347 unsigned long flags;
348 struct pci_dn *pdn; 348 struct pci_dn *pdn;
349 enum pci_channel_state state;
350 int rc = 0; 349 int rc = 0;
351 350
352 total_mmio_ffs++; 351 total_mmio_ffs++;
@@ -452,12 +451,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
452 eeh_mark_slot (dn, EEH_MODE_ISOLATED); 451 eeh_mark_slot (dn, EEH_MODE_ISOLATED);
453 spin_unlock_irqrestore(&confirm_error_lock, flags); 452 spin_unlock_irqrestore(&confirm_error_lock, flags);
454 453
455 state = pci_channel_io_normal; 454 eeh_send_failure_event (dn, dev);
456 if ((rets[0] == 1) || (rets[0] == 2) || (rets[0] == 4))
457 state = pci_channel_io_frozen;
458 if (rets[0] == 5)
459 state = pci_channel_io_perm_failure;
460 eeh_send_failure_event (dn, dev, state, rets[2]);
461 455
462 /* Most EEH events are due to device driver bugs. Having 456 /* Most EEH events are due to device driver bugs. Having
463 * a stack trace will help the device-driver authors figure 457 * a stack trace will help the device-driver authors figure
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 5ec6edf19ece..6493f593687f 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -342,13 +342,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
342 return NULL; 342 return NULL;
343 } 343 }
344 344
345#if 0
346 /* We may get "permanent failure" messages on empty slots.
347 * These are false alarms. Empty slots have no child dn. */
348 if ((event->state == pci_channel_io_perm_failure) && (frozen_device == NULL))
349 return;
350#endif
351
352 frozen_pdn = PCI_DN(frozen_dn); 345 frozen_pdn = PCI_DN(frozen_dn);
353 frozen_pdn->eeh_freeze_count++; 346 frozen_pdn->eeh_freeze_count++;
354 347
@@ -363,12 +356,9 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
363 if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES) 356 if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
364 goto excess_failures; 357 goto excess_failures;
365 358
366 /* If the reset state is a '5' and the time to reset is 0 (infinity) 359 /* Get the current PCI slot state. */
367 * or is more then 15 seconds, then mark this as a permanent failure. 360 rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
368 */ 361 if (rc < 0) {
369 if ((event->state == pci_channel_io_perm_failure) &&
370 ((event->time_unavail <= 0) ||
371 (event->time_unavail > MAX_WAIT_FOR_RECOVERY*1000))) {
372 printk(KERN_WARNING "EEH: Permanent failure\n"); 362 printk(KERN_WARNING "EEH: Permanent failure\n");
373 goto hard_fail; 363 goto hard_fail;
374 } 364 }
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c
index 49037edf7d39..221dec8c16bd 100644
--- a/arch/powerpc/platforms/pseries/eeh_event.c
+++ b/arch/powerpc/platforms/pseries/eeh_event.c
@@ -118,9 +118,7 @@ static void eeh_thread_launcher(struct work_struct *dummy)
118 * (from a workqueue). 118 * (from a workqueue).
119 */ 119 */
120int eeh_send_failure_event (struct device_node *dn, 120int eeh_send_failure_event (struct device_node *dn,
121 struct pci_dev *dev, 121 struct pci_dev *dev)
122 enum pci_channel_state state,
123 int time_unavail)
124{ 122{
125 unsigned long flags; 123 unsigned long flags;
126 struct eeh_event *event; 124 struct eeh_event *event;
@@ -144,8 +142,6 @@ int eeh_send_failure_event (struct device_node *dn,
144 142
145 event->dn = dn; 143 event->dn = dn;
146 event->dev = dev; 144 event->dev = dev;
147 event->state = state;
148 event->time_unavail = time_unavail;
149 145
150 /* We may or may not be called in an interrupt context */ 146 /* We may or may not be called in an interrupt context */
151 spin_lock_irqsave(&eeh_eventlist_lock, flags); 147 spin_lock_irqsave(&eeh_eventlist_lock, flags);