Re: [PATCH scsi-misc-2.6 13/13] scsi: consolidate scsi_cmd_retry() calls in scsi_error.c

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

 



13_scsi_consolidate_cmd_retry_calls_in_eh.patch

	Replace all scsi_setup_cmd_retry() calls in scsi_error.c with
	a call just above scsi_finish_command() in scsi_eh_flush_done_q().

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

 scsi_error.c |   25 +------------------------
 1 files changed, 1 insertion(+), 24 deletions(-)

Index: scsi-export/drivers/scsi/scsi_error.c
===================================================================
--- scsi-export.orig/drivers/scsi/scsi_error.c	2005-03-31 18:06:22.000000000 +0900
+++ scsi-export/drivers/scsi/scsi_error.c	2005-03-31 18:06:23.000000000 +0900
@@ -615,11 +615,6 @@ static int scsi_request_sense(struct scs
 
 	kfree(scsi_result);
 
-	/*
-	 * when we eventually call scsi_finish, we really wish to complete
-	 * the original request, so let's restore the original data. (db)
-	 */
-	scsi_setup_cmd_retry(scmd);
 	scmd->result = saved_result;
 	return rtn;
 }
@@ -641,14 +636,7 @@ static void scsi_eh_finish_cmd(struct sc
 {
 	scmd->device->host->host_failed--;
 	scmd->state = SCSI_STATE_BHQUEUE;
-
 	scsi_eh_eflags_clr_all(scmd);
-
-	/*
-	 * set this back so that the upper level can correctly free up
-	 * things.
-	 */
-	scsi_setup_cmd_retry(scmd);
 	list_move_tail(&scmd->eh_entry, done_q);
 }
 
@@ -785,12 +773,6 @@ retry_tur:
 	rtn = scsi_send_eh_cmnd(scmd, SENSE_TIMEOUT);
 
 	/*
-	 * when we eventually call scsi_finish, we really wish to complete
-	 * the original request, so let's restore the original data. (db)
-	 */
-	scsi_setup_cmd_retry(scmd);
-
-	/*
 	 * hey, we are done.  let's look to see what happened.
 	 */
 	SCSI_LOG_ERROR_RECOVERY(3, printk("%s: scmd %p rtn %x\n",
@@ -913,12 +895,6 @@ static int scsi_eh_try_stu(struct scsi_c
 	rtn = scsi_send_eh_cmnd(scmd, START_UNIT_TIMEOUT);
 
 	/*
-	 * when we eventually call scsi_finish, we really wish to complete
-	 * the original request, so let's restore the original data. (db)
-	 */
-	scsi_setup_cmd_retry(scmd);
-
-	/*
 	 * hey, we are done.  let's look to see what happened.
 	 */
 	SCSI_LOG_ERROR_RECOVERY(3, printk("%s: scmd %p rtn %x\n",
@@ -1558,6 +1534,7 @@ static void scsi_eh_flush_done_q(struct 
 			SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush finish"
 							" cmd: %p\n",
 							current->comm, scmd));
+			scsi_setup_cmd_retry(scmd);
 			scsi_finish_command(scmd);
 		}
 	}

-
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