Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ipipe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomaixenomai
  • ipipe
  • Repository
Switch branch/tag
  • ipipe
  • drivers
  • scsi
  • ufs
  • ufshcd.c
Find file BlameHistoryPermalink
  • Venkat Gopalakrishnan's avatar
    scsi: ufshcd: Fix race between clk scaling and ungate work · 1304eb90
    Venkat Gopalakrishnan authored Oct 17, 2016
    commit f2a785ac
    
     upstream.
    
    The ungate work turns on the clock before it exits hibern8, if the link
    was put in hibern8 during clock gating work.  There occurs a race
    condition when clock scaling work calls ufshcd_hold() to make sure low
    power states cannot be entered, but that returns by checking only
    whether the clocks are on.  This causes the clock scaling work to issue
    UIC commands when the link is in hibern8 causing failures. Make sure we
    exit hibern8 state before returning from ufshcd_hold().
    
    Callstacks for race condition:
    
     ufshcd_scale_gear
     ufshcd_devfreq_scale
     ufshcd_devfreq_target
     update_devfreq
     devfreq_monitor
     process_one_work
     worker_thread
     kthread
     ret_from_fork
    
     ufshcd_uic_hibern8_exit
     ufshcd_ungate_work
     process_one_work
     worker_thread
     kthread
     ret_from_fork
    
    Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
    Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    1304eb90

Imprint & Privacy Policy