1. 13 Sep, 2019 1 commit
    • Ulf Hansson's avatar
      mmc: tmio: Fixup runtime PM management during probe · aa86f1a3
      Ulf Hansson authored
      
      
      The tmio_mmc_host_probe() calls pm_runtime_set_active() to update the
      runtime PM status of the device, as to make it reflect the current status
      of the HW. This works fine for most cases, but unfortunate not for all.
      Especially, there is a generic problem when the device has a genpd attached
      and that genpd have the ->start|stop() callbacks assigned.
      
      More precisely, if the driver calls pm_runtime_set_active() during
      ->probe(), genpd does not get to invoke the ->start() callback for it,
      which means the HW isn't really fully powered on. Furthermore, in the next
      phase, when the device becomes runtime suspended, genpd will invoke the
      ->stop() callback for it, potentially leading to usage count imbalance
      problems, depending on what's implemented behind the callbacks of course.
      
      To fix this problem, convert to call pm_runtime_get_sync() from
      tmio_mmc_host_probe() rather than pm_runtime_set_active(). Additionally, to
      avoid bumping usage counters and unnecessary re-initializing the HW the
      first time the tmio driver's ->runtime_resume() callback is called,
      introduce a state flag to keeping track of this.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Tested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      aa86f1a3
  2. 15 Apr, 2019 2 commits
  3. 26 Feb, 2019 1 commit
  4. 17 Dec, 2018 2 commits
  5. 15 Oct, 2018 3 commits
  6. 08 Oct, 2018 2 commits
  7. 16 Jul, 2018 1 commit
  8. 18 Jan, 2018 2 commits
  9. 21 Dec, 2017 1 commit
  10. 19 Dec, 2017 4 commits
  11. 18 Dec, 2017 3 commits
  12. 30 Aug, 2017 5 commits
  13. 20 Jun, 2017 5 commits
  14. 24 Apr, 2017 3 commits
  15. 13 Feb, 2017 2 commits
  16. 29 Nov, 2016 3 commits