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-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to