|
@@ -876,8 +876,6 @@ int cxl_reset(struct cxl *adapter)
|
|
|
{
|
|
{
|
|
|
struct pci_dev *dev = to_pci_dev(adapter->dev.parent);
|
|
struct pci_dev *dev = to_pci_dev(adapter->dev.parent);
|
|
|
int rc;
|
|
int rc;
|
|
|
- int i;
|
|
|
|
|
- u32 val;
|
|
|
|
|
|
|
|
|
|
if (adapter->perst_same_image) {
|
|
if (adapter->perst_same_image) {
|
|
|
dev_warn(&dev->dev,
|
|
dev_warn(&dev->dev,
|
|
@@ -895,20 +893,6 @@ int cxl_reset(struct cxl *adapter)
|
|
|
return rc;
|
|
return rc;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /* the PERST done above fences the PHB. So, reset depends on EEH
|
|
|
|
|
- * to unbind the driver, tell Sapphire to reinit the PHB, and rebind
|
|
|
|
|
- * the driver. Do an mmio read explictly to ensure EEH notices the
|
|
|
|
|
- * fenced PHB. Retry for a few seconds before giving up. */
|
|
|
|
|
- i = 0;
|
|
|
|
|
- while (((val = mmio_read32be(adapter->p1_mmio)) != 0xffffffff) &&
|
|
|
|
|
- (i < 5)) {
|
|
|
|
|
- msleep(500);
|
|
|
|
|
- i++;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (val != 0xffffffff)
|
|
|
|
|
- dev_err(&dev->dev, "cxl: PERST failed to trigger EEH\n");
|
|
|
|
|
-
|
|
|
|
|
return rc;
|
|
return rc;
|
|
|
}
|
|
}
|
|
|
|
|
|