void rtsx_pci_start_run(struct rtsx_pcr *pcr) { /* If pci device removed, don't queue idle work any more */ if (pcr->remove_pci) return; if (pcr->state != PDEV_STAT_RUN) { pcr->state = PDEV_STAT_RUN; if (pcr->ops->enable_auto_blink) pcr->ops->enable_auto_blink(pcr); if (pcr->aspm_en) rtsx_pci_write_config_byte(pcr, LCTLR, 0); } mod_delayed_work(system_wq, &pcr->idle_work, msecs_to_jiffies(200)); }
void rtsx_pci_start_run(struct rtsx_pcr *pcr) { /* If pci device removed, don't queue idle work any more */ if (pcr->remove_pci) return; if (pcr->state != PDEV_STAT_RUN) { pcr->state = PDEV_STAT_RUN; if (pcr->ops->enable_auto_blink) pcr->ops->enable_auto_blink(pcr); if (pcr->aspm_en) rtsx_pci_write_config_byte(pcr, LCTLR, 0); } mutex_unlock(&pcr->pcr_mutex); cancel_delayed_work_sync(&pcr->idle_work); schedule_delayed_work(&pcr->idle_work, msecs_to_jiffies(200)); mutex_lock(&pcr->pcr_mutex); }