]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/scsi/atari_NCR5380.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
[mv-sheeva.git] / drivers / scsi / atari_NCR5380.c
index c912733ac077c07e5d98d12d5f26fefe177e0053..03dbe60c264aa5c4490654a9c528f59766b5faab 100644 (file)
@@ -657,7 +657,7 @@ static inline void NCR5380_print_phase(struct Scsi_Host *instance)
 #include <linux/interrupt.h>
 
 static volatile int main_running;
-static DECLARE_WORK(NCR5380_tqueue, (void (*)(void *))NCR5380_main, NULL);
+static DECLARE_WORK(NCR5380_tqueue, NCR5380_main);
 
 static inline void queue_main(void)
 {
@@ -893,45 +893,6 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
        return 0;
 }
 
-/*
- * our own old-style timeout update
- */
-/*
- * The strategy is to cause the timer code to call scsi_times_out()
- * when the soonest timeout is pending.
- * The arguments are used when we are queueing a new command, because
- * we do not want to subtract the time used from this time, but when we
- * set the timer, we want to take this value into account.
- */
-
-int atari_scsi_update_timeout(Scsi_Cmnd * SCset, int timeout)
-{
-       int rtn;
-
-       /*
-        * We are using the new error handling code to actually register/deregister
-        * timers for timeout.
-        */
-
-       if (!timer_pending(&SCset->eh_timeout))
-               rtn = 0;
-       else
-               rtn = SCset->eh_timeout.expires - jiffies;
-
-       if (timeout == 0) {
-               del_timer(&SCset->eh_timeout);
-               SCset->eh_timeout.data = (unsigned long)NULL;
-               SCset->eh_timeout.expires = 0;
-       } else {
-               if (SCset->eh_timeout.data != (unsigned long)NULL)
-                       del_timer(&SCset->eh_timeout);
-               SCset->eh_timeout.data = (unsigned long)SCset;
-               SCset->eh_timeout.expires = jiffies + timeout;
-               add_timer(&SCset->eh_timeout);
-       }
-       return rtn;
-}
-
 /*
  * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd,
  *     void (*done)(Scsi_Cmnd *))
@@ -956,7 +917,6 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
        Scsi_Cmnd *tmp;
        int oldto;
        unsigned long flags;
-       // extern int update_timeout(Scsi_Cmnd * SCset, int timeout);
 
 #if (NDEBUG & NDEBUG_NO_WRITE)
        switch (cmd->cmnd[0]) {
@@ -1029,9 +989,9 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
         * alter queues and touch the lock.
         */
        if (!IS_A_TT()) {
-               oldto = atari_scsi_update_timeout(cmd, 0);
+               /* perhaps stop command timer here */
                falcon_get_lock();
-               atari_scsi_update_timeout(cmd, oldto);
+               /* perhaps restart command timer here */
        }
        if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) {
                LIST(cmd, hostdata->issue_queue);
@@ -1075,7 +1035,7 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
  *  reenable them.  This prevents reentrancy and kernel stack overflow.
  */
 
-static void NCR5380_main(void *bl)
+static void NCR5380_main(struct work_struct *work)
 {
        Scsi_Cmnd *tmp, *prev;
        struct Scsi_Host *instance = first_instance;