|
@@ -749,21 +749,24 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state stat
|
|
eeh_unfreeze_pe(pe, false);
|
|
eeh_unfreeze_pe(pe, false);
|
|
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
|
|
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
|
|
eeh_pe_dev_traverse(pe, eeh_restore_dev_state, dev);
|
|
eeh_pe_dev_traverse(pe, eeh_restore_dev_state, dev);
|
|
|
|
+ eeh_pe_state_clear(pe, EEH_PE_ISOLATED);
|
|
break;
|
|
break;
|
|
case pcie_hot_reset:
|
|
case pcie_hot_reset:
|
|
|
|
+ eeh_pe_state_mark(pe, EEH_PE_ISOLATED);
|
|
eeh_ops->set_option(pe, EEH_OPT_FREEZE_PE);
|
|
eeh_ops->set_option(pe, EEH_OPT_FREEZE_PE);
|
|
eeh_pe_dev_traverse(pe, eeh_disable_and_save_dev_state, dev);
|
|
eeh_pe_dev_traverse(pe, eeh_disable_and_save_dev_state, dev);
|
|
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
|
|
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
|
|
eeh_ops->reset(pe, EEH_RESET_HOT);
|
|
eeh_ops->reset(pe, EEH_RESET_HOT);
|
|
break;
|
|
break;
|
|
case pcie_warm_reset:
|
|
case pcie_warm_reset:
|
|
|
|
+ eeh_pe_state_mark(pe, EEH_PE_ISOLATED);
|
|
eeh_ops->set_option(pe, EEH_OPT_FREEZE_PE);
|
|
eeh_ops->set_option(pe, EEH_OPT_FREEZE_PE);
|
|
eeh_pe_dev_traverse(pe, eeh_disable_and_save_dev_state, dev);
|
|
eeh_pe_dev_traverse(pe, eeh_disable_and_save_dev_state, dev);
|
|
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
|
|
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
|
|
eeh_ops->reset(pe, EEH_RESET_FUNDAMENTAL);
|
|
eeh_ops->reset(pe, EEH_RESET_FUNDAMENTAL);
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
- eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
|
|
|
|
|
|
+ eeh_pe_state_clear(pe, EEH_PE_ISOLATED | EEH_PE_CFG_BLOCKED);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -1058,6 +1061,9 @@ void eeh_add_device_early(struct pci_dn *pdn)
|
|
if (!edev || !eeh_enabled())
|
|
if (!edev || !eeh_enabled())
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
+ if (!eeh_has_flag(EEH_PROBE_MODE_DEVTREE))
|
|
|
|
+ return;
|
|
|
|
+
|
|
/* USB Bus children of PCI devices will not have BUID's */
|
|
/* USB Bus children of PCI devices will not have BUID's */
|
|
phb = edev->phb;
|
|
phb = edev->phb;
|
|
if (NULL == phb ||
|
|
if (NULL == phb ||
|
|
@@ -1112,6 +1118,9 @@ void eeh_add_device_late(struct pci_dev *dev)
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (eeh_has_flag(EEH_PROBE_MODE_DEV))
|
|
|
|
+ eeh_ops->probe(pdn, NULL);
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* The EEH cache might not be removed correctly because of
|
|
* The EEH cache might not be removed correctly because of
|
|
* unbalanced kref to the device during unplug time, which
|
|
* unbalanced kref to the device during unplug time, which
|