]> err.no Git - linux-2.6/commitdiff
[SCSI] kill scsi_rety_command
authorChristoph Hellwig <hch@lst.de>
Tue, 2 Jan 2007 11:56:00 +0000 (12:56 +0100)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 13 Jan 2007 19:50:21 +0000 (13:50 -0600)
scsi_retry_command only has a single caller, so there is no point
in having this function.  Additionally the memset of the sense
buffer it does is entirely superflous as scsi_request_fn already
calls scsi_init_cmd_errh to perform this memset before the command
is reissued.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_priv.h

index 24cffd98ee63546ce716e0277812dda9bafd08d2..f33e2eb9f1b9b657ce0ea582a6007681c53f5b86 100644 (file)
@@ -672,27 +672,6 @@ void __scsi_done(struct scsi_cmnd *cmd)
        blk_complete_request(rq);
 }
 
-/*
- * Function:    scsi_retry_command
- *
- * Purpose:     Send a command back to the low level to be retried.
- *
- * Notes:       This command is always executed in the context of the
- *              bottom half handler, or the error handler thread. Low
- *              level drivers should not become re-entrant as a result of
- *              this.
- */
-int scsi_retry_command(struct scsi_cmnd *cmd)
-{
-        /*
-         * Zero the sense information from the last time we tried
-         * this command.
-         */
-       memset(cmd->sense_buffer, 0, sizeof(cmd->sense_buffer));
-
-       return scsi_queue_insert(cmd, SCSI_MLQUEUE_EH_RETRY);
-}
-
 /*
  * Function:    scsi_finish_command
  *
index f02f48a882a97b4150a7afe9eb403f1ce7f293fb..503f09c2f05fb64b19d254cbb82bcf2632750590 100644 (file)
@@ -1400,7 +1400,7 @@ static void scsi_softirq_done(struct request *rq)
                        scsi_finish_command(cmd);
                        break;
                case NEEDS_RETRY:
-                       scsi_retry_command(cmd);
+                       scsi_queue_insert(cmd, SCSI_MLQUEUE_EH_RETRY);
                        break;
                case ADD_TO_MLQUEUE:
                        scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY);
index f458c2f686d2364d4387ea0bc8b4d0afec6f8d4c..d4faa19609d9915b77249681fdd8c2bbfee9f49a 100644 (file)
@@ -28,7 +28,6 @@ extern int scsi_dispatch_cmd(struct scsi_cmnd *cmd);
 extern int scsi_setup_command_freelist(struct Scsi_Host *shost);
 extern void scsi_destroy_command_freelist(struct Scsi_Host *shost);
 extern void __scsi_done(struct scsi_cmnd *cmd);
-extern int scsi_retry_command(struct scsi_cmnd *cmd);
 #ifdef CONFIG_SCSI_LOGGING
 void scsi_log_send(struct scsi_cmnd *cmd);
 void scsi_log_completion(struct scsi_cmnd *cmd, int disposition);