lkml.org 
[lkml]   [2005]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH scsi-misc-2.6 06/07] scsi: add cmd->result clearing
Date
06_scsi_requeue_reset_result.patch

cmd->result wasn't cleared on requeue or reprep. Clear it.

Signed-off-by: Tejun Heo <htejun@gmail.com>

scsi.c | 9 +++++----
scsi_lib.c | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)

Index: scsi-reqfn-export/drivers/scsi/scsi.c
===================================================================
--- scsi-reqfn-export.orig/drivers/scsi/scsi.c 2005-04-12 21:50:11.000000000 +0900
+++ scsi-reqfn-export/drivers/scsi/scsi.c 2005-04-12 21:50:12.000000000 +0900
@@ -681,11 +681,12 @@ void scsi_retry_command(struct scsi_cmnd
*/
scsi_setup_cmd_retry(cmd);

- /*
- * Zero the sense information from the last time we tried
- * this command.
- */
+ /*
+ * Zero the sense information and result code from the last
+ * time we tried this command.
+ */
memset(cmd->sense_buffer, 0, sizeof(cmd->sense_buffer));
+ cmd->result = 0;

scsi_requeue_command(cmd);
}
Index: scsi-reqfn-export/drivers/scsi/scsi_lib.c
===================================================================
--- scsi-reqfn-export.orig/drivers/scsi/scsi_lib.c 2005-04-12 21:50:12.000000000 +0900
+++ scsi-reqfn-export/drivers/scsi/scsi_lib.c 2005-04-12 21:50:12.000000000 +0900
@@ -222,6 +222,7 @@ static int scsi_init_cmd_errh(struct scs
cmd->abort_reason = 0;

memset(cmd->sense_buffer, 0, sizeof cmd->sense_buffer);
+ cmd->result = 0;

if (cmd->cmd_len == 0)
cmd->cmd_len = COMMAND_SIZE(cmd->cmnd[0]);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-12 16:05    [W:0.381 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site