Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Linas Vepstas and committed by
Paul Mackerras
d0ab95ca 9c547768

+6 -30
+1 -7
arch/powerpc/platforms/pseries/eeh.c
··· 346 346 int rets[3]; 347 347 unsigned long flags; 348 348 struct pci_dn *pdn; 349 - enum pci_channel_state state; 350 349 int rc = 0; 351 350 352 351 total_mmio_ffs++; ··· 451 452 eeh_mark_slot (dn, EEH_MODE_ISOLATED); 452 453 spin_unlock_irqrestore(&confirm_error_lock, flags); 453 454 454 - state = pci_channel_io_normal; 455 - if ((rets[0] == 1) || (rets[0] == 2) || (rets[0] == 4)) 456 - state = pci_channel_io_frozen; 457 - if (rets[0] == 5) 458 - state = pci_channel_io_perm_failure; 459 - eeh_send_failure_event (dn, dev, state, rets[2]); 455 + eeh_send_failure_event (dn, dev); 460 456 461 457 /* Most EEH events are due to device driver bugs. Having 462 458 * a stack trace will help the device-driver authors figure
+3 -13
arch/powerpc/platforms/pseries/eeh_driver.c
··· 342 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 345 frozen_pdn = PCI_DN(frozen_dn); 353 346 frozen_pdn->eeh_freeze_count++; 354 347 ··· 356 363 if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES) 357 364 goto excess_failures; 358 365 359 - /* If the reset state is a '5' and the time to reset is 0 (infinity) 360 - * or is more then 15 seconds, then mark this as a permanent failure. 361 - */ 362 - if ((event->state == pci_channel_io_perm_failure) && 363 - ((event->time_unavail <= 0) || 364 - (event->time_unavail > MAX_WAIT_FOR_RECOVERY*1000))) { 366 + /* Get the current PCI slot state. */ 367 + rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000); 368 + if (rc < 0) { 365 369 printk(KERN_WARNING "EEH: Permanent failure\n"); 366 370 goto hard_fail; 367 371 }
+1 -5
arch/powerpc/platforms/pseries/eeh_event.c
··· 118 118 * (from a workqueue). 119 119 */ 120 120 int eeh_send_failure_event (struct device_node *dn, 121 - struct pci_dev *dev, 122 - enum pci_channel_state state, 123 - int time_unavail) 121 + struct pci_dev *dev) 124 122 { 125 123 unsigned long flags; 126 124 struct eeh_event *event; ··· 142 144 143 145 event->dn = dn; 144 146 event->dev = dev; 145 - event->state = state; 146 - event->time_unavail = time_unavail; 147 147 148 148 /* We may or may not be called in an interrupt context */ 149 149 spin_lock_irqsave(&eeh_eventlist_lock, flags);
+1 -5
include/asm-powerpc/eeh_event.h
··· 30 30 struct list_head list; 31 31 struct device_node *dn; /* struct device node */ 32 32 struct pci_dev *dev; /* affected device */ 33 - enum pci_channel_state state; /* PCI bus state for the affected device */ 34 - int time_unavail; /* milliseconds until device might be available */ 35 33 }; 36 34 37 35 /** ··· 44 46 * (from a workqueue). 45 47 */ 46 48 int eeh_send_failure_event (struct device_node *dn, 47 - struct pci_dev *dev, 48 - enum pci_channel_state state, 49 - int time_unavail); 49 + struct pci_dev *dev); 50 50 51 51 /* Main recovery function */ 52 52 struct pci_dn * handle_eeh_events (struct eeh_event *);