Commit d0ab95ca authored by Linas Vepstas's avatar Linas Vepstas Committed by Paul Mackerras

[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: default avatarLinas Vepstas <linas@austin.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 9c547768
...@@ -346,7 +346,6 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) ...@@ -346,7 +346,6 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
int rets[3]; int rets[3];
unsigned long flags; unsigned long flags;
struct pci_dn *pdn; struct pci_dn *pdn;
enum pci_channel_state state;
int rc = 0; int rc = 0;
total_mmio_ffs++; total_mmio_ffs++;
...@@ -452,12 +451,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) ...@@ -452,12 +451,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
eeh_mark_slot (dn, EEH_MODE_ISOLATED); eeh_mark_slot (dn, EEH_MODE_ISOLATED);
spin_unlock_irqrestore(&confirm_error_lock, flags); spin_unlock_irqrestore(&confirm_error_lock, flags);
state = pci_channel_io_normal; eeh_send_failure_event (dn, dev);
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]);
/* Most EEH events are due to device driver bugs. Having /* Most EEH events are due to device driver bugs. Having
* a stack trace will help the device-driver authors figure * a stack trace will help the device-driver authors figure
......
...@@ -342,13 +342,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) ...@@ -342,13 +342,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
return NULL; 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 = PCI_DN(frozen_dn);
frozen_pdn->eeh_freeze_count++; frozen_pdn->eeh_freeze_count++;
...@@ -363,12 +356,9 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) ...@@ -363,12 +356,9 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES) if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
goto excess_failures; goto excess_failures;
/* If the reset state is a '5' and the time to reset is 0 (infinity) /* Get the current PCI slot state. */
* or is more then 15 seconds, then mark this as a permanent failure. rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
*/ if (rc < 0) {
if ((event->state == pci_channel_io_perm_failure) &&
((event->time_unavail <= 0) ||
(event->time_unavail > MAX_WAIT_FOR_RECOVERY*1000))) {
printk(KERN_WARNING "EEH: Permanent failure\n"); printk(KERN_WARNING "EEH: Permanent failure\n");
goto hard_fail; goto hard_fail;
} }
......
...@@ -118,9 +118,7 @@ static void eeh_thread_launcher(struct work_struct *dummy) ...@@ -118,9 +118,7 @@ static void eeh_thread_launcher(struct work_struct *dummy)
* (from a workqueue). * (from a workqueue).
*/ */
int eeh_send_failure_event (struct device_node *dn, int eeh_send_failure_event (struct device_node *dn,
struct pci_dev *dev, struct pci_dev *dev)
enum pci_channel_state state,
int time_unavail)
{ {
unsigned long flags; unsigned long flags;
struct eeh_event *event; struct eeh_event *event;
...@@ -144,8 +142,6 @@ int eeh_send_failure_event (struct device_node *dn, ...@@ -144,8 +142,6 @@ int eeh_send_failure_event (struct device_node *dn,
event->dn = dn; event->dn = dn;
event->dev = dev; event->dev = dev;
event->state = state;
event->time_unavail = time_unavail;
/* We may or may not be called in an interrupt context */ /* We may or may not be called in an interrupt context */
spin_lock_irqsave(&eeh_eventlist_lock, flags); spin_lock_irqsave(&eeh_eventlist_lock, flags);
......
...@@ -30,8 +30,6 @@ struct eeh_event { ...@@ -30,8 +30,6 @@ struct eeh_event {
struct list_head list; struct list_head list;
struct device_node *dn; /* struct device node */ struct device_node *dn; /* struct device node */
struct pci_dev *dev; /* affected device */ 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 { ...@@ -46,9 +44,7 @@ struct eeh_event {
* (from a workqueue). * (from a workqueue).
*/ */
int eeh_send_failure_event (struct device_node *dn, int eeh_send_failure_event (struct device_node *dn,
struct pci_dev *dev, struct pci_dev *dev);
enum pci_channel_state state,
int time_unavail);
/* Main recovery function */ /* Main recovery function */
struct pci_dn * handle_eeh_events (struct eeh_event *); struct pci_dn * handle_eeh_events (struct eeh_event *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment