From: Ye Bin <yebin10@huawei.com>
To: <jejb@linux.ibm.com>, <martin.petersen@oracle.com>,
<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Ye Bin <yebin10@huawei.com>
Subject: [PATCH] scsi: core: add CMD_LAST flag for error handle scsi command
Date: Thu, 14 Dec 2023 20:29:19 +0800 [thread overview]
Message-ID: <20231214122919.985087-1-yebin10@huawei.com> (raw)
SCSI error handle will send scsi command bypass block layer. After commit
8930a6c20791 scsi support request batching. Some LLD only writing the hardware
doorbell when necessary, after the last request was prepared.
For scsi error handle, each command waits synchronously. So each scsi command
is both the beginning and the end. So add CMD_LAST flag for error handle scsi
command.
Fixes: 8930a6c20791 ("scsi: core: add support for request batching")
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
drivers/scsi/scsi_error.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 1bac12ef238e..9e79047a1250 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1147,6 +1147,7 @@ static enum scsi_disposition scsi_send_eh_cmnd(struct scsi_cmnd *scmd,
const unsigned long stall_for = msecs_to_jiffies(100);
int rtn;
+ scmd->flags |= SCMD_LAST;
retry:
scsi_eh_prep_cmnd(scmd, &ses, cmnd, cmnd_size, sense_bytes);
shost->eh_action = &done;
--
2.31.1
next reply other threads:[~2023-12-14 12:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 12:29 Ye Bin [this message]
2023-12-15 5:00 ` [PATCH] scsi: core: add CMD_LAST flag for error handle scsi command Christoph Hellwig
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=20231214122919.985087-1-yebin10@huawei.com \
--to=yebin10@huawei.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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