From: Can Guo <cang@codeaurora.org>
To: Kiwoong Kim <kwmad.kim@samsung.com>
Cc: linux-scsi@vger.kernel.org,
'Bart Van Assche' <bvanassche@acm.org>,
'Avri Altman' <avri.altman@wdc.com>,
'Bean Huo' <beanhuo@micron.com>,
'Jaegeuk Kim' <jaegeuk@kernel.org>
Subject: Re: Question about coherency of comand context between ufs and scsi
Date: Tue, 15 Jun 2021 16:21:33 +0800 [thread overview]
Message-ID: <e509fe5d6d9bd7feb0474ee5cfafc55e@codeaurora.org> (raw)
In-Reply-To: <4c0d76848b42aff5c9a2364f97086841@codeaurora.org>
On 2021-06-15 16:07, Can Guo wrote:
> On 2021-06-15 15:56, Kiwoong Kim wrote:
>>> If scsi added it into its error command list and wakes-up scsi_eh
>>> though the command is actually completed, scsi_eh will invoke
>>> eh_abort_handler and the symptom will be duplicated, I think
>>>
>>> Otherwise, is there anyone who know how to guarantee the coherency?
>>
scsi_times_out() guarantees that -
300 /*
301 * Set the command to complete first in order to prevent a real
302 * completion from releasing the command while error handling
303 * is using it. If the command was already completed, then the
304 * lower level driver beat the timeout handler, and it is safe
305 * to return without escalating error recovery.
306 *
307 * If timeout handling lost the race to a real completion, the
308 * block layer may ignore that due to a fake timeout injection,
309 * so return RESET_TIMER to allow error handling another shot
310 * at this command.
311 */
312 if (test_and_set_bit(SCMD_STATE_COMPLETE, &scmd->state))
313 return BLK_EH_RESET_TIMER;
Please read above comments.
Can Guo.
>>> In 5.13 kernel, it is scsi_print_command(cmd) in ufshcd_abort(),
>>> while in
>>> 5.12 and earlier kernel, it is scsi_print_command(hba->lrb[tag].cmd).
>>> Which kernel are you using here?
>>>
>>> Thanks,
>>> Can Guo.
>>
>> Thank you for your information. I'm seeing 5.4.
>> Yes, for null pointer, you're right.
>> Then, what do you think?
>> In the situation I told, is there still the possibility that I
>> suggested?
>
> You can make the code change to that line in your project same as 5.13.
>
> Thanks,
>
> Can Guo.
>
>>
>> Thanks.
>> Kiwoong Kim
prev parent reply other threads:[~2021-06-15 8:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210614095245epcas2p2e8512382423332786f584d5ef1e225d3@epcas2p2.samsung.com>
2021-06-14 9:52 ` Question about coherency of comand context between ufs and scsi Kiwoong Kim
2021-06-15 1:09 ` Can Guo
2021-06-15 7:56 ` Kiwoong Kim
2021-06-15 8:07 ` Can Guo
2021-06-15 8:21 ` Can Guo [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=e509fe5d6d9bd7feb0474ee5cfafc55e@codeaurora.org \
--to=cang@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=jaegeuk@kernel.org \
--cc=kwmad.kim@samsung.com \
--cc=linux-scsi@vger.kernel.org \
/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).