1. 27 Jan, 2022 1 commit
  2. 06 Jan, 2021 1 commit
  3. 25 Jul, 2020 1 commit
    • Alan Stern's avatar
      scsi: block: pm: Simplify resume handling · 8f38f8e0
      Alan Stern authored
      Commit 05d18ae1 ("scsi: pm: Balance pm_only counter of request queue
      during system resume") fixed a problem in the block layer's runtime-PM
      code: blk_set_runtime_active() failed to call blk_clear_pm_only().
      However, the commit's implementation was awkward; it forced the SCSI
      system-resume handler to choose whether to call blk_post_runtime_resume()
      or blk_set_runtime_active(), depending on whether or not the SCSI device
      had previously been runtime suspended.
      
      This patch simplifies the situation considerably by adding the missing
      function call directly into blk_set_runtime_active() (under the condition
      that the queue is not already in the RPM_ACTIVE state).  This allows the
      SCSI routine to revert back to its original form.  Furthermore, making this
      change reveals that blk_post_runtime_resume() (in its success pathway) does
      exactly the same thing as blk_set_runtime_active().  The duplicate code is
      easily removed by making one routine call the other.
      
      No functional changes are intended.
      
      Link: https://lore.kernel.org/r/20200706151436.GA702867@rowland.harvard.edu
      
      
      CC: Can Guo <cang@codeaurora.org>
      CC: Bart Van Assche <bvanassche@acm.org>
      Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      8f38f8e0
  4. 12 Sep, 2019 1 commit
  5. 15 Nov, 2018 1 commit
  6. 26 Sep, 2018 3 commits