Skip to content

Commit

Permalink
core/pci: Avoid hreset after freset
Browse files Browse the repository at this point in the history
Commit 5ac71c9 ("pci: Avoid hot resets at boot time") missed to
avoid hot reset after fundamental reset for PCIe common slots.
This fixes it.

Cc: stable # 5.3.x
Reported-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
Gavin Shan authored and stewartsmith committed Feb 16, 2017
1 parent 88c9fab commit 53a08f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/pcie-slot.c
Expand Up @@ -410,7 +410,8 @@ static int64_t pcie_slot_sm_freset(struct pci_slot *slot)
case PCI_SLOT_STATE_FRESET_POWER_OFF:
PCIE_SLOT_DBG(slot, "FRESET: Power is off, turn on\n");
pcie_slot_set_power_state_ext(slot, PCI_SLOT_POWER_ON, false);
pci_slot_set_state(slot, PCI_SLOT_STATE_HRESET_START);

pci_slot_set_state(slot, PCI_SLOT_STATE_LINK_START_POLL);
return pci_slot_set_sm_timeout(slot, msecs_to_tb(50));
default:
prlog(PR_ERR, PCIE_SLOT_PREFIX
Expand Down

0 comments on commit 53a08f1

Please sign in to comment.