upgrade to linux 2.6.10-1.12_FC2
[linux-2.6.git] / drivers / s390 / net / ctcmain.c
index 6a1cb3f..fff33b1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ctcmain.c,v 1.63 2004/07/28 12:27:54 ptiedem Exp $
+ * $Id: ctcmain.c,v 1.65 2004/10/27 09:12:48 mschwide Exp $
  *
  * CTC / ESCON network driver
  *
@@ -36,7 +36,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.63 $
+ * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.65 $
  *
  */
 \f
@@ -51,6 +51,7 @@
 #include <linux/interrupt.h>
 #include <linux/timer.h>
 #include <linux/sched.h>
+#include <linux/bitops.h>
 
 #include <linux/signal.h>
 #include <linux/string.h>
@@ -65,7 +66,6 @@
 #include <asm/io.h>
 #include <asm/ccwdev.h>
 #include <asm/ccwgroup.h>
-#include <asm/bitops.h>
 #include <asm/uaccess.h>
 
 #include <asm/idals.h>
@@ -320,7 +320,7 @@ static void
 print_banner(void)
 {
        static int printed = 0;
-       char vbuf[] = "$Revision: 1.63 $";
+       char vbuf[] = "$Revision: 1.65 $";
        char *version = vbuf;
 
        if (printed)
@@ -1224,7 +1224,9 @@ ch_action_setmode(fsm_instance * fi, int event, void *arg)
        fsm_deltimer(&ch->timer);
        fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch);
        fsm_newstate(fi, CH_STATE_SETUPWAIT);
-       if (event == CH_EVENT_TIMER)
+       saveflags = 0;  /* avoids compiler warning with
+                          spin_unlock_irqrestore */
+       if (event == CH_EVENT_TIMER)    // only for timer not yet locked
                spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
        rc = ccw_device_start(ch->cdev, &ch->ccw[6], (unsigned long) ch, 0xff, 0);
        if (event == CH_EVENT_TIMER)
@@ -1335,7 +1337,9 @@ ch_action_haltio(fsm_instance * fi, int event, void *arg)
        DBF_TEXT(trace, 3, __FUNCTION__);
        fsm_deltimer(&ch->timer);
        fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch);
-       if (event == CH_EVENT_STOP)
+       saveflags = 0;  /* avoids comp warning with
+                          spin_unlock_irqrestore */
+       if (event == CH_EVENT_STOP)     // only for STOP not yet locked
                spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
        oldstate = fsm_getstate(fi);
        fsm_newstate(fi, CH_STATE_TERM);
@@ -1508,7 +1512,9 @@ ch_action_restart(fsm_instance * fi, int event, void *arg)
        fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch);
        oldstate = fsm_getstate(fi);
        fsm_newstate(fi, CH_STATE_STARTWAIT);
-       if (event == CH_EVENT_TIMER)
+       saveflags = 0;  /* avoids compiler warning with
+                          spin_unlock_irqrestore */
+       if (event == CH_EVENT_TIMER)    // only for timer not yet locked
                spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
        rc = ccw_device_halt(ch->cdev, (unsigned long) ch);
        if (event == CH_EVENT_TIMER)
@@ -1674,7 +1680,9 @@ ch_action_txretry(fsm_instance * fi, int event, void *arg)
                                return;
                        }
                        fsm_addtimer(&ch->timer, 1000, CH_EVENT_TIMER, ch);
-                       if (event == CH_EVENT_TIMER)
+                       saveflags = 0;  /* avoids compiler warning with
+                                          spin_unlock_irqrestore */
+                       if (event == CH_EVENT_TIMER) // only for TIMER not yet locked
                                spin_lock_irqsave(get_ccwdev_lock(ch->cdev),
                                                  saveflags);
                        rc = ccw_device_start(ch->cdev, &ch->ccw[3],