aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 184bcaeaf812..1cb5f7d4f278 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -68,6 +68,8 @@
68#include "scsi_priv.h" 68#include "scsi_priv.h"
69#include "scsi_logging.h" 69#include "scsi_logging.h"
70 70
71static void scsi_done(struct scsi_cmnd *cmd);
72static int scsi_retry_command(struct scsi_cmnd *cmd);
71 73
72/* 74/*
73 * Definitions and constants. 75 * Definitions and constants.
@@ -638,10 +640,12 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
638 } 640 }
639 spin_unlock_irqrestore(host->host_lock, flags); 641 spin_unlock_irqrestore(host->host_lock, flags);
640 if (rtn) { 642 if (rtn) {
641 atomic_inc(&cmd->device->iodone_cnt); 643 if (scsi_delete_timer(cmd)) {
642 scsi_queue_insert(cmd, 644 atomic_inc(&cmd->device->iodone_cnt);
643 (rtn == SCSI_MLQUEUE_DEVICE_BUSY) ? 645 scsi_queue_insert(cmd,
644 rtn : SCSI_MLQUEUE_HOST_BUSY); 646 (rtn == SCSI_MLQUEUE_DEVICE_BUSY) ?
647 rtn : SCSI_MLQUEUE_HOST_BUSY);
648 }
645 SCSI_LOG_MLQUEUE(3, 649 SCSI_LOG_MLQUEUE(3,
646 printk("queuecommand : request rejected\n")); 650 printk("queuecommand : request rejected\n"));
647 } 651 }
@@ -739,7 +743,7 @@ static DEFINE_PER_CPU(struct list_head, scsi_done_q);
739 * 743 *
740 * This function is interrupt context safe. 744 * This function is interrupt context safe.
741 */ 745 */
742void scsi_done(struct scsi_cmnd *cmd) 746static void scsi_done(struct scsi_cmnd *cmd)
743{ 747{
744 /* 748 /*
745 * We don't have to worry about this one timing out any more. 749 * We don't have to worry about this one timing out any more.
@@ -834,7 +838,7 @@ static void scsi_softirq(struct softirq_action *h)
834 * level drivers should not become re-entrant as a result of 838 * level drivers should not become re-entrant as a result of
835 * this. 839 * this.
836 */ 840 */
837int scsi_retry_command(struct scsi_cmnd *cmd) 841static int scsi_retry_command(struct scsi_cmnd *cmd)
838{ 842{
839 /* 843 /*
840 * Restore the SCSI command state. 844 * Restore the SCSI command state.