aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Schmitz <schmitz@opal.biophys.uni-duesseldorf.de>2007-06-03 06:55:04 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-04 10:55:15 -0400
commit8ce7955aa52c37db1425ea4bd4edcfa67e253454 (patch)
tree749497a3805184b8e0d2985965980f851012615b /drivers
parent94774a3a8e01989960aaadaea6deff51a4e7deed (diff)
[SCSI] atari_NCR5380: update_timeout removal
Atari SCSI driver fixes: remove update_timeout kludge Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/atari_NCR5380.c44
1 files changed, 2 insertions, 42 deletions
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c
index eff846ae0aff..03dbe60c264a 100644
--- a/drivers/scsi/atari_NCR5380.c
+++ b/drivers/scsi/atari_NCR5380.c
@@ -894,45 +894,6 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
894} 894}
895 895
896/* 896/*
897 * our own old-style timeout update
898 */
899/*
900 * The strategy is to cause the timer code to call scsi_times_out()
901 * when the soonest timeout is pending.
902 * The arguments are used when we are queueing a new command, because
903 * we do not want to subtract the time used from this time, but when we
904 * set the timer, we want to take this value into account.
905 */
906
907int atari_scsi_update_timeout(Scsi_Cmnd * SCset, int timeout)
908{
909 int rtn;
910
911 /*
912 * We are using the new error handling code to actually register/deregister
913 * timers for timeout.
914 */
915
916 if (!timer_pending(&SCset->eh_timeout))
917 rtn = 0;
918 else
919 rtn = SCset->eh_timeout.expires - jiffies;
920
921 if (timeout == 0) {
922 del_timer(&SCset->eh_timeout);
923 SCset->eh_timeout.data = (unsigned long)NULL;
924 SCset->eh_timeout.expires = 0;
925 } else {
926 if (SCset->eh_timeout.data != (unsigned long)NULL)
927 del_timer(&SCset->eh_timeout);
928 SCset->eh_timeout.data = (unsigned long)SCset;
929 SCset->eh_timeout.expires = jiffies + timeout;
930 add_timer(&SCset->eh_timeout);
931 }
932 return rtn;
933}
934
935/*
936 * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd, 897 * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd,
937 * void (*done)(Scsi_Cmnd *)) 898 * void (*done)(Scsi_Cmnd *))
938 * 899 *
@@ -956,7 +917,6 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
956 Scsi_Cmnd *tmp; 917 Scsi_Cmnd *tmp;
957 int oldto; 918 int oldto;
958 unsigned long flags; 919 unsigned long flags;
959 // extern int update_timeout(Scsi_Cmnd * SCset, int timeout);
960 920
961#if (NDEBUG & NDEBUG_NO_WRITE) 921#if (NDEBUG & NDEBUG_NO_WRITE)
962 switch (cmd->cmnd[0]) { 922 switch (cmd->cmnd[0]) {
@@ -1029,9 +989,9 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
1029 * alter queues and touch the lock. 989 * alter queues and touch the lock.
1030 */ 990 */
1031 if (!IS_A_TT()) { 991 if (!IS_A_TT()) {
1032 oldto = atari_scsi_update_timeout(cmd, 0); 992 /* perhaps stop command timer here */
1033 falcon_get_lock(); 993 falcon_get_lock();
1034 atari_scsi_update_timeout(cmd, oldto); 994 /* perhaps restart command timer here */
1035 } 995 }
1036 if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) { 996 if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) {
1037 LIST(cmd, hostdata->issue_queue); 997 LIST(cmd, hostdata->issue_queue);