Skip to content

Commit 5b57a6c

Browse files
kkaneshigegregkh
authored andcommitted
PCI: hotplug: pciehp: wait for 1 second after power off slot
According to the specification, we must wait for at least 1 second after turning power off before taking any action that relies on power having been removed from the slot/adapter. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent cca03de commit 5b57a6c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎drivers/pci/hotplug/pciehp_ctrl.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
197197
__FUNCTION__);
198198
return;
199199
}
200+
/*
201+
* After turning power off, we must wait for at least
202+
* 1 second before taking any action that relies on
203+
* power having been removed from the slot/adapter.
204+
*/
205+
msleep(1000);
200206
}
201207
}
202208

@@ -615,6 +621,12 @@ int pciehp_disable_slot(struct slot *p_slot)
615621
mutex_unlock(&p_slot->ctrl->crit_sect);
616622
return -EINVAL;
617623
}
624+
/*
625+
* After turning power off, we must wait for at least
626+
* 1 second before taking any action that relies on
627+
* power having been removed from the slot/adapter.
628+
*/
629+
msleep(1000);
618630
}
619631

620632
ret = remove_board(p_slot);

0 commit comments

Comments
 (0)