Loading drivers/scsi/ufs/ufshcd.c +6 −2 Original line number Diff line number Diff line Loading @@ -8903,6 +8903,7 @@ static void ufshcd_remove_device(struct ufs_hba *hba) int sdev_count = 0, i; unsigned long flags; hba->card_removal_in_progress = 1; ufshcd_hold_all(hba); /* Reset the host controller */ spin_lock_irqsave(hba->host->host_lock, flags); Loading Loading @@ -8933,6 +8934,7 @@ static void ufshcd_remove_device(struct ufs_hba *hba) spin_unlock_irqrestore(hba->host->host_lock, flags); ufshcd_release_all(hba); hba->card_removal_in_progress = 0; } static void ufshcd_card_detect_handler(struct work_struct *work) Loading @@ -8958,9 +8960,11 @@ static int ufshcd_card_detect_notifier(struct notifier_block *nb, { struct ufs_hba *hba = container_of(nb, struct ufs_hba, card_detect_nb); if (event) if (event) { if (hba->card_removal_in_progress) goto out; ufshcd_set_card_online(hba); else } else ufshcd_set_card_offline(hba); if (ufshcd_is_card_offline(hba) && !hba->sdev_ufs_device) Loading drivers/scsi/ufs/ufshcd.h +2 −0 Original line number Diff line number Diff line Loading @@ -768,6 +768,7 @@ enum ufshcd_card_state { * @card_detect_nb: card detector notifier registered with @extcon * @card_detect_work: work to exectute the card detect function * @card_state: card state event, enum ufshcd_card_state defines possible states * @card_removal_in_progress: to track card removal progress * @vreg_info: UFS device voltage regulator information * @clk_list_head: UFS host controller clocks list node head * @pwr_info: holds current power mode Loading Loading @@ -1005,6 +1006,7 @@ struct ufs_hba { struct notifier_block card_detect_nb; struct work_struct card_detect_work; atomic_t card_state; int card_removal_in_progress; struct ufs_pa_layer_attr pwr_info; struct ufs_pwr_mode_info max_pwr_info; Loading Loading
drivers/scsi/ufs/ufshcd.c +6 −2 Original line number Diff line number Diff line Loading @@ -8903,6 +8903,7 @@ static void ufshcd_remove_device(struct ufs_hba *hba) int sdev_count = 0, i; unsigned long flags; hba->card_removal_in_progress = 1; ufshcd_hold_all(hba); /* Reset the host controller */ spin_lock_irqsave(hba->host->host_lock, flags); Loading Loading @@ -8933,6 +8934,7 @@ static void ufshcd_remove_device(struct ufs_hba *hba) spin_unlock_irqrestore(hba->host->host_lock, flags); ufshcd_release_all(hba); hba->card_removal_in_progress = 0; } static void ufshcd_card_detect_handler(struct work_struct *work) Loading @@ -8958,9 +8960,11 @@ static int ufshcd_card_detect_notifier(struct notifier_block *nb, { struct ufs_hba *hba = container_of(nb, struct ufs_hba, card_detect_nb); if (event) if (event) { if (hba->card_removal_in_progress) goto out; ufshcd_set_card_online(hba); else } else ufshcd_set_card_offline(hba); if (ufshcd_is_card_offline(hba) && !hba->sdev_ufs_device) Loading
drivers/scsi/ufs/ufshcd.h +2 −0 Original line number Diff line number Diff line Loading @@ -768,6 +768,7 @@ enum ufshcd_card_state { * @card_detect_nb: card detector notifier registered with @extcon * @card_detect_work: work to exectute the card detect function * @card_state: card state event, enum ufshcd_card_state defines possible states * @card_removal_in_progress: to track card removal progress * @vreg_info: UFS device voltage regulator information * @clk_list_head: UFS host controller clocks list node head * @pwr_info: holds current power mode Loading Loading @@ -1005,6 +1006,7 @@ struct ufs_hba { struct notifier_block card_detect_nb; struct work_struct card_detect_work; atomic_t card_state; int card_removal_in_progress; struct ufs_pa_layer_attr pwr_info; struct ufs_pwr_mode_info max_pwr_info; Loading