diff options
author | Hannes Reinecke <hare@suse.de> | 2013-10-23 04:51:20 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-10-25 07:00:23 -0400 |
commit | 6b1e5a45d4eaa75e28f2d170ea43ab8fc6dd34d8 (patch) | |
tree | b4a711ee7cf326986beecdd1a0b3204dc07ae43f /drivers/scsi/scsi.c | |
parent | 53a8936cb5bc95b7616cfa9e45d6145c630cea1d (diff) |
[SCSI] 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>
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r-- | drivers/scsi/scsi.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index eaa808e6ba91..fe0bcb18fb26 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c | |||
@@ -78,11 +78,6 @@ static void scsi_done(struct scsi_cmnd *cmd); | |||
78 | * Definitions and constants. | 78 | * Definitions and constants. |
79 | */ | 79 | */ |
80 | 80 | ||
81 | #define MIN_RESET_DELAY (2*HZ) | ||
82 | |||
83 | /* Do not call reset on error if we just did a reset within 15 sec. */ | ||
84 | #define MIN_RESET_PERIOD (15*HZ) | ||
85 | |||
86 | /* | 81 | /* |
87 | * Note - the initial logging level can be set here to log events at boot time. | 82 | * Note - the initial logging level can be set here to log events at boot time. |
88 | * After the system is up, you may enable logging via the /proc interface. | 83 | * After the system is up, you may enable logging via the /proc interface. |
@@ -658,7 +653,6 @@ EXPORT_SYMBOL(scsi_cmd_get_serial); | |||
658 | int scsi_dispatch_cmd(struct scsi_cmnd *cmd) | 653 | int scsi_dispatch_cmd(struct scsi_cmnd *cmd) |
659 | { | 654 | { |
660 | struct Scsi_Host *host = cmd->device->host; | 655 | struct Scsi_Host *host = cmd->device->host; |
661 | unsigned long timeout; | ||
662 | int rtn = 0; | 656 | int rtn = 0; |
663 | 657 | ||
664 | atomic_inc(&cmd->device->iorequest_cnt); | 658 | atomic_inc(&cmd->device->iorequest_cnt); |
@@ -704,28 +698,6 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd) | |||
704 | (cmd->device->lun << 5 & 0xe0); | 698 | (cmd->device->lun << 5 & 0xe0); |
705 | } | 699 | } |
706 | 700 | ||
707 | /* | ||
708 | * We will wait MIN_RESET_DELAY clock ticks after the last reset so | ||
709 | * we can avoid the drive not being ready. | ||
710 | */ | ||
711 | timeout = host->last_reset + MIN_RESET_DELAY; | ||
712 | |||
713 | if (host->resetting && time_before(jiffies, timeout)) { | ||
714 | int ticks_remaining = timeout - jiffies; | ||
715 | /* | ||
716 | * NOTE: This may be executed from within an interrupt | ||
717 | * handler! This is bad, but for now, it'll do. The irq | ||
718 | * level of the interrupt handler has been masked out by the | ||
719 | * platform dependent interrupt handling code already, so the | ||
720 | * sti() here will not cause another call to the SCSI host's | ||
721 | * interrupt handler (assuming there is one irq-level per | ||
722 | * host). | ||
723 | */ | ||
724 | while (--ticks_remaining >= 0) | ||
725 | mdelay(1 + 999 / HZ); | ||
726 | host->resetting = 0; | ||
727 | } | ||
728 | |||
729 | scsi_log_send(cmd); | 701 | scsi_log_send(cmd); |
730 | 702 | ||
731 | /* | 703 | /* |