lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 Dec 2023 20:29:19 +0800
From:   Ye Bin <yebin10@...wei.com>
To:     <jejb@...ux.ibm.com>, <martin.petersen@...cle.com>,
        <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     Ye Bin <yebin10@...wei.com>
Subject: [PATCH] scsi: core: add CMD_LAST flag for error handle scsi command

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@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ