From: Bart Van Assche <bvanassche@acm.org>
To: Adrian Hunter <adrian.hunter@intel.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Daejun Park <daejun7.park@samsung.com>,
Bean Huo <beanhuo@micron.com>, Can Guo <cang@codeaurora.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Avri Altman <avri.altman@wdc.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Asutosh Das <asutoshd@codeaurora.org>
Subject: Re: [PATCH 5/5] scsi: ufs: Add a sysfs attribute for triggering the UFS EH
Date: Wed, 13 Oct 2021 09:56:15 -0700 [thread overview]
Message-ID: <598bbbc4-ab07-0354-045a-14ba5220f814@acm.org> (raw)
In-Reply-To: <cd4b5103-e0fd-feed-2663-b505bcf019d8@intel.com>
On 10/13/21 1:09 AM, Adrian Hunter wrote:
> On 13/10/2021 00:54, Bart Van Assche wrote:
>> Make it possible to test the impact of the UFS error handler on software
>> that submits SCSI commands to the UFS driver.
>
> Are you sure this isn't better suited to debugfs?
I will convert this attribute into a debugfs attribute.
>> + if (ufshcd_eh_in_progress(hba))
>> + return -EBUSY;
>
> Does it matter if ufshcd_eh_in_progress()?
The UFS error handler modifies hba->ufshcd_state and assumes that no
other code modifies hba->ufshcd_state while the error handler is in
progress. Hence this check.
>> + } else {
>> + return -EINVAL;
>> + }
>> +
>> + scsi_schedule_eh(hba->host);
>
> Probably should be:
>
> queue_work(hba->eh_wq, &hba->eh_work);
No. This patch is intended for Martin Petersen's 5.16/scsi-queue branch.
The patch "Revert "scsi: ufs: Synchronize SCSI and UFS error handling""
has been queued on the 5.15/scsi-fixes branch only.
> However, it might be simpler to replace everything with:
>
> spin_lock(hba->host->host_lock);
> hba->saved_err |= <something>;
> hba->saved_uic_err |= <something else>;
> ufshcd_schedule_eh_work(hba);
> spin_unlock(hba->host->host_lock);
>
> Perhaps letting the user specify values to determine <something>
> and <something else>
I will look into this.
Thanks,
Bart.
next prev parent reply other threads:[~2021-10-13 16:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 21:54 [PATCH 0/5] UFS patches for kernel v5.16 Bart Van Assche
2021-10-12 21:54 ` [PATCH 1/5] scsi: ufs: Revert "Retry aborted SCSI commands instead of completing these successfully" Bart Van Assche
2021-10-12 21:54 ` [PATCH 2/5] scsi: ufs: Improve source code comments Bart Van Assche
2021-10-12 21:54 ` [PATCH 3/5] scsi: ufs: Improve static type checking Bart Van Assche
2021-10-12 21:54 ` [PATCH 4/5] scsi: ufs: Log error handler activity Bart Van Assche
2021-10-13 7:43 ` Adrian Hunter
2021-10-12 21:54 ` [PATCH 5/5] scsi: ufs: Add a sysfs attribute for triggering the UFS EH Bart Van Assche
2021-10-13 7:19 ` Greg Kroah-Hartman
2021-10-13 16:50 ` Bart Van Assche
2021-10-13 8:09 ` Adrian Hunter
2021-10-13 10:11 ` Avri Altman
2021-10-13 16:56 ` Bart Van Assche [this message]
2021-10-14 6:11 ` Adrian Hunter
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=598bbbc4-ab07-0354-045a-14ba5220f814@acm.org \
--to=bvanassche@acm.org \
--cc=adrian.hunter@intel.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=cang@codeaurora.org \
--cc=daejun7.park@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=martin.petersen@oracle.com \
--cc=mchehab+huawei@kernel.org \
--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