LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Bean Huo (beanhuo)" <beanhuo@micron.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"huobean@gmail.com" <huobean@gmail.com>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
	"tomas.winkler@intel.com" <tomas.winkler@intel.com>,
	"cang@codeaurora.org" <cang@codeaurora.org>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [EXT] Re: [PATCH v3 1/1] scsi: ufs: fix LRB pointer incorrect initialization issue
Date: Tue, 10 Mar 2020 07:53:09 +0000	[thread overview]
Message-ID: <BN7PR08MB5684F9667DE1CD05D0D01EE6DBFF0@BN7PR08MB5684.namprd08.prod.outlook.com> (raw)
In-Reply-To: <ede4addf-73c7-e5f8-5143-91eb0cd3eb9b@acm.org>

Hi, Bart 

> Subject: [EXT] Re: [PATCH v3 1/1] scsi: ufs: fix LRB pointer incorrect initialization
> issue
> 
> On 2020-03-09 09:10, huobean@gmail.com wrote:
> > @@ -4834,6 +4829,7 @@ static void __ufshcd_transfer_req_compl(struct
> ufs_hba *hba,
> >  			continue;
> >  		cmd = blk_mq_rq_to_pdu(req);
> >  		lrbp = scsi_cmd_priv(cmd);
> > +		ufshcd_init_lrb(hba, lrbp, index);
> >  		if (ufshcd_is_scsi(req)) {
> >  			ufshcd_add_command_trace(hba, req, "complete");
> >  			result = ufshcd_transfer_rsp_status(hba, lrbp);
> 
> This ufshcd_init_lrb() call looks incorrect to me. I think that
> ufshcd_init_lrb() should only be called before a request is submitted to the UFS
> controller and also that ufshcd_init_lrb() should not be called from the
> completion path.
> 

__ufshcd_transfer_req_compl()
	ufshcd_transfer_rsp_status()  will access lrbp->ucd_rsp_ptr.
Without calling ufshcd_init_lrb() here, there will be an error.

//Bean

 
> Thanks,
> 
> Bart.

  reply	other threads:[~2020-03-10  7:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09 16:10 [PATCH v3 0/1] " huobean
2020-03-09 16:10 ` [PATCH v3 1/1] " huobean
2020-03-10  1:58   ` Bart Van Assche
2020-03-10  7:53     ` Bean Huo (beanhuo) [this message]
2020-03-11  3:49       ` [EXT] " Bart Van Assche

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=BN7PR08MB5684F9667DE1CD05D0D01EE6DBFF0@BN7PR08MB5684.namprd08.prod.outlook.com \
    --to=beanhuo@micron.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=huobean@gmail.com \
    --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 \
    --cc=tomas.winkler@intel.com \
    --subject='RE: [EXT] Re: [PATCH v3 1/1] scsi: ufs: fix LRB pointer incorrect initialization issue' \
    /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

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).