linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "James E . J . Bottomley" <jejb@linux.ibm.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>, Can Guo <cang@codeaurora.org>,
	Stanley Chu <stanley.chu@mediatek.com>
Subject: Re: [PATCH V2] scsi: ufs-pci: Add LTR support for Intel controllers
Date: Wed, 9 Sep 2020 17:06:05 +0300	[thread overview]
Message-ID: <a27fa387-356c-82e1-a49f-62602336589e@intel.com> (raw)
In-Reply-To: <dc615e02-18a3-334d-dbc4-8aba94e4be6b@intel.com>

On 2/09/20 12:27 pm, Adrian Hunter wrote:
> On 2/09/20 5:12 am, Martin K. Petersen wrote:
>>
>> Adrian,
>>
>>> Intel host controllers support the setting of latency tolerance.
>>> Accordingly, implement the PM QoS ->set_latency_tolerance() callback. The
>>> raw register values are also exposed via debugfs.
>>
>> Does not apply to 5.10/scsi-queue. Please rebase. Thanks!
>>
> 
> Hi
> 
> Thanks for processing this.
> 
> The 5.10/scsi-queue branch seems to be missing the following fix.  If you cherry
> pick that, then it applies.

Now there seem to be conflicts between 5.10/scsi-queue and v5.9-rc4.
I am not sure what I can do?


~/git/scsi-mkp$ git branch -v --list 5.10/scsi-queue
* 5.10/scsi-queue 2e9defc7e918 [ahead 427, behind 97] scsi: ufs: Fix a race condition between error handler and runtime PM ops
~/git/scsi-mkp$ git rebase --onto v5.9-rc4 v5.9-rc1
First, rewinding head to replay your work on top of it...
Applying: scsi: ufs: Add checks before setting clk-gating states
Applying: scsi: ufs: ufs-qcom: Fix race conditions caused by ufs_qcom_testbus_config()
Applying: scsi: ufs-qcom: Remove testbus dump in ufs_qcom_dump_dbg_regs
Applying: scsi: ufs: Add some debug information to ufshcd_print_host_state()
Applying: scsi: ufs: Fix concurrency of error handler and other error recovery paths
Applying: scsi: ufs: Recover HBA runtime PM error in error handler
Applying: scsi: ufs: Move dumps in IRQ handler to error handler
Applying: scsi: ufs: Fix a race condition between error handler and runtime PM ops
Applying: scsi: ufs: Properly release resources if a task is aborted successfully
Using index info to reconstruct a base tree...
M       drivers/scsi/ufs/ufshcd.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/scsi/ufs/ufshcd.c
CONFLICT (content): Merge conflict in drivers/scsi/ufs/ufshcd.c
error: Failed to merge in the changes.
Patch failed at 0009 scsi: ufs: Properly release resources if a task is aborted successfully
Use 'git am --show-current-patch' to see the failed patch

Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".

~/git/scsi-mkp$ git diff
diff --cc drivers/scsi/ufs/ufshcd.c
index d9386f85c255,efb40b1b95b4..000000000000
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@@ -6640,12 -6636,8 +6640,14 @@@ static int ufshcd_abort(struct scsi_cmn
                goto out;
        }
  
++<<<<<<< HEAD
 +cleanup:
 +      scsi_dma_unmap(cmd);
 +
++=======
++>>>>>>> scsi: ufs: Properly release resources if a task is aborted successfully
        spin_lock_irqsave(host->host_lock, flags);
-       ufshcd_outstanding_req_clear(hba, tag);
-       hba->lrb[tag].cmd = NULL;
+       __ufshcd_transfer_req_compl(hba, (1UL << tag));
        spin_unlock_irqrestore(host->host_lock, flags);
  
  out:

~/git/scsi-mkp$ git am --show-current-patch | head -25
commit 8bb2dde069d860e7ea379862a7d0e8ee01cec5e9
Author: Can Guo <cang@codeaurora.org>
Date:   Sun Aug 9 05:15:55 2020 -0700

    scsi: ufs: Properly release resources if a task is aborted successfully
    
    In current UFS task abort hook, namely ufshcd_abort(), if one task is
    aborted successfully, clk_gating.active_reqs held by this task is not
    decreased, which makes clk_gating.active_reqs stay above zero forever, thus
    clock gating would never happen. Instead of releasing resources of one task
    "manually", use the existing func __ufshcd_transfer_req_compl().  This
    change also eliminates a possible race of scsi_dma_unmap() from the real
    completion in IRQ handler path.
    
    Link: https://lore.kernel.org/r/1596975355-39813-10-git-send-email-cang@codeaurora.org
    Fixes: 1ab27c9cf8b6 ("ufs: Add support for clock gating")
    CC: Stanley Chu <stanley.chu@mediatek.com>
    Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
    Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
    Signed-off-by: Can Guo <cang@codeaurora.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


  reply	other threads:[~2020-09-09 15:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27  7:20 [PATCH V2] scsi: ufs-pci: Add LTR support for Intel controllers Adrian Hunter
2020-08-27 12:08 ` Avri Altman
2020-09-02  2:12 ` Martin K. Petersen
2020-09-02  9:27   ` Adrian Hunter
2020-09-09 14:06     ` Adrian Hunter [this message]
2020-09-11 14:01       ` Adrian Hunter
2020-09-11 14:28         ` Martin K. Petersen
2020-09-15 20:19 ` Martin K. Petersen
2020-09-22  3:56 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a27fa387-356c-82e1-a49f-62602336589e@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=cang@codeaurora.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanley.chu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).