summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2013-10-23 10:51:20 +0200
committerJens Axboe <axboe@fb.com>2015-04-02 12:12:26 -0600
commit8137efac0fdfc419d1ff95b1d2eeb71076205b9d (patch)
tree0537ca839defcdd6223341edf10d0e638198605e
parentc74c6a40640ef42ba9bc1f71b29f2926b1de06ce (diff)
remove check for 'resetting'
Field is now unused, so this is dead code. [jejb: remove resetting and last_reset from Scsi_Host] Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/scsi.c28
-rw-r--r--include/scsi/scsi_host.h2
2 files changed, 0 insertions, 30 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 20feb8291b6c..fab2c2a10910 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -78,11 +78,6 @@ static void scsi_done(struct scsi_cmnd *cmd);
* Definitions and constants.
*/
-#define MIN_RESET_DELAY (2*HZ)
-
-/* Do not call reset on error if we just did a reset within 15 sec. */
-#define MIN_RESET_PERIOD (15*HZ)
-
/*
* Note - the initial logging level can be set here to log events at boot time.
* After the system is up, you may enable logging via the /proc interface.
@@ -659,7 +654,6 @@ EXPORT_SYMBOL(scsi_cmd_get_serial);
int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
{
struct Scsi_Host *host = cmd->device->host;
- unsigned long timeout;
int rtn = 0;
atomic_inc(&cmd->device->iorequest_cnt);
@@ -705,28 +699,6 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
(cmd->device->lun << 5 & 0xe0);
}
- /*
- * We will wait MIN_RESET_DELAY clock ticks after the last reset so
- * we can avoid the drive not being ready.
- */
- timeout = host->last_reset + MIN_RESET_DELAY;
-
- if (host->resetting && time_before(jiffies, timeout)) {
- int ticks_remaining = timeout - jiffies;
- /*
- * NOTE: This may be executed from within an interrupt
- * handler! This is bad, but for now, it'll do. The irq
- * level of the interrupt handler has been masked out by the
- * platform dependent interrupt handling code already, so the
- * sti() here will not cause another call to the SCSI host's
- * interrupt handler (assuming there is one irq-level per
- * host).
- */
- while (--ticks_remaining >= 0)
- mdelay(1 + 999 / HZ);
- host->resetting = 0;
- }
-
scsi_log_send(cmd);
/*
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 50769a72166b..3120d4e897fd 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -601,8 +601,6 @@ struct Scsi_Host {
unsigned int host_eh_scheduled; /* EH scheduled without command */
unsigned int host_no; /* Used for IOCTL_GET_IDLUN, /proc/scsi et al. */
- int resetting; /* if set, it means that last_reset is a valid value */
- unsigned long last_reset;
/*
* These three parameters can be used to allow for wide scsi,