RE: [PATCH v1] ufs: core: fix deadlock when rtc update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -8188,8 +8188,15 @@ static void ufshcd_rtc_work(struct work_struct
> *work)
> 
>         hba = container_of(to_delayed_work(work), struct ufs_hba,
> ufs_rtc_update_work);
Will returning here If (!ufshcd_is_ufs_dev_active(hba)) works?
And remove it in the 2nd if clause?

Thanks,
Avri
> 
> -        /* Update RTC only when there are no requests in progress and UFSHCI is
> operational */
> -       if (!ufshcd_is_ufs_dev_busy(hba) && hba->ufshcd_state ==
> UFSHCD_STATE_OPERATIONAL)
> +        /*
> +         * Update RTC only when
> +         * 1. there are no requests in progress
> +         * 2. UFSHCI is operational
> +         * 3. pm operation is not in progress
> +         */
> +       if (!ufshcd_is_ufs_dev_busy(hba) &&
> +           hba->ufshcd_state == UFSHCD_STATE_OPERATIONAL &&
> +           !hba->pm_op_in_progress)
>                 ufshcd_update_rtc(hba);
> 
>         if (ufshcd_is_ufs_dev_active(hba) && hba->dev_info.rtc_update_period)
> --
> 2.18.0






[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux