vserver 1.9.5.x5
[linux-2.6.git] / drivers / s390 / cio / css.c
index dd12416..948b3b1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  drivers/s390/cio/css.c
  *  driver for channel subsystem
- *   $Revision: 1.82 $
+ *   $Revision: 1.84 $
  *
  *    Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
  *                      IBM Corporation
@@ -188,6 +188,12 @@ css_evaluate_subchannel(int irq, int slow)
                        put_device(&sch->dev);
                return 0; /* Already processed. */
        }
+       /*
+        * We've got a machine check, so running I/O won't get an interrupt.
+        * Kill any pending timers.
+        */
+       if (sch)
+               device_kill_pending_timer(sch);
        if (!disc && !slow) {
                if (sch)
                        put_device(&sch->dev);
@@ -298,7 +304,7 @@ struct slow_subchannel {
 };
 
 static LIST_HEAD(slow_subchannels_head);
-static spinlock_t slow_subchannel_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(slow_subchannel_lock);
 
 static void
 css_trigger_slow_path(void)
@@ -521,7 +527,7 @@ css_enqueue_subchannel_slow(unsigned long schid)
        new_slow_sch = kmalloc(sizeof(struct slow_subchannel), GFP_ATOMIC);
        if (!new_slow_sch)
                return -ENOMEM;
-       memset(new_slow_sch, sizeof(struct slow_subchannel), 0);
+       memset(new_slow_sch, 0, sizeof(struct slow_subchannel));
        new_slow_sch->schid = schid;
        spin_lock_irqsave(&slow_subchannel_lock, flags);
        list_add_tail(&new_slow_sch->slow_list, &slow_subchannels_head);