Re: [PATCH scsi-misc-2.6 06/07] scsi: add cmd->result clearing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



06_scsi_requeue_reset_result.patch

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

Signed-off-by: Tejun Heo <[email protected]>

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux