hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/pci/hotplug/pciehp_ctrl.c
....@@ -256,6 +256,14 @@
256256 present = pciehp_card_present(ctrl);
257257 link_active = pciehp_check_link_active(ctrl);
258258 if (present <= 0 && link_active <= 0) {
259
+ if (ctrl->state == BLINKINGON_STATE) {
260
+ ctrl->state = OFF_STATE;
261
+ cancel_delayed_work(&ctrl->button_work);
262
+ pciehp_set_indicators(ctrl, PCI_EXP_SLTCTL_PWR_IND_OFF,
263
+ INDICATOR_NOOP);
264
+ ctrl_info(ctrl, "Slot(%s): Card not present\n",
265
+ slot_name(ctrl));
266
+ }
259267 mutex_unlock(&ctrl->state_lock);
260268 return;
261269 }