Skip to content

Commit 8bb7c7a

Browse files
kkaneshigegregkh
authored andcommitted
pciehp: wait for 1000ms before LED operation after power off
After turning power off, we must wait for at least 1 second *before* LED operation. 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 d48b5d3 commit 8bb7c7a

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

‎drivers/pci/hotplug/pciehp_ctrl.c‎

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

@@ -610,12 +604,6 @@ int pciehp_disable_slot(struct slot *p_slot)
610604
mutex_unlock(&p_slot->ctrl->crit_sect);
611605
return -EINVAL;
612606
}
613-
/*
614-
* After turning power off, we must wait for at least
615-
* 1 second before taking any action that relies on
616-
* power having been removed from the slot/adapter.
617-
*/
618-
msleep(1000);
619607
}
620608

621609
ret = remove_board(p_slot);

‎drivers/pci/hotplug/pciehp_hpc.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,13 @@ static int hpc_power_off_slot(struct slot * slot)
674674
dbg("%s: SLOTCTRL %x write cmd %x\n",
675675
__FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_cmd);
676676

677+
/*
678+
* After turning power off, we must wait for at least 1 second
679+
* before taking any action that relies on power having been
680+
* removed from the slot/adapter.
681+
*/
682+
msleep(1000);
683+
677684
return retval;
678685
}
679686

0 commit comments

Comments
 (0)