LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Bean Huo (beanhuo)" <beanhuo@micron.com>,
"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 20:49:48 -0700 [thread overview]
Message-ID: <00b4f8d0-32d3-58c7-6361-6177ed8aaaed@acm.org> (raw)
In-Reply-To: <BN7PR08MB5684F9667DE1CD05D0D01EE6DBFF0@BN7PR08MB5684.namprd08.prod.outlook.com>
On 2020-03-10 00:53, Bean Huo (beanhuo) wrote:
> 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.
Hi Bean,
I think that ufshcd_init_lrb() should only be called from the code that
prepares a command before it is submitted and not from the command
completion path. Because v5.6-rc5 has already been released, there is
not that much time left until the merge window opens. I think it is less
risky to revert commit 34656dda81ac ("scsi: ufs: Let the SCSI core
allocate per-command UFS data") than to proceed with the above patch. Do
you want to submit a revert or do you perhaps want me to do that?
Thanks,
Bart.
prev parent reply other threads:[~2020-03-11 3:52 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 ` [EXT] " Bean Huo (beanhuo)
2020-03-11 3:49 ` Bart Van Assche [this message]
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=00b4f8d0-32d3-58c7-6361-6177ed8aaaed@acm.org \
--to=bvanassche@acm.org \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--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).