[S390] dasd: ignore unsolicited interrupts for DIAG
authorStefan Haberland <stefan.haberland@de.ibm.com>
Mon, 25 Oct 2010 14:10:49 +0000 (16:10 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 25 Oct 2010 14:10:21 +0000 (16:10 +0200)
For the DASD DIAG discipline IO is started through special diagnose
calls. Unsolicited interrupts may contain information about the device
itself. But this information is not needed because the device is not
used directly.
Fix the case that an unimplemented dicipline function may be called
by ignoring unsolicited interrupts for the DIAG disciplin.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd.c

index 80e45de096a90a90edfbdb8846774834c9fff982..fb613d70c2cbb32e381bba6951568bc217ac8d5c 100644 (file)
@@ -1107,17 +1107,22 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
                if (cqr)
                        memcpy(&cqr->irb, irb, sizeof(*irb));
                device = dasd_device_from_cdev_locked(cdev);
-               if (!IS_ERR(device)) {
-                       device->discipline->dump_sense_dbf(device, irb,
-                                                          "unsolicited");
-                       if ((device->features & DASD_FEATURE_ERPLOG))
-                               device->discipline->dump_sense(device, cqr,
-                                                              irb);
-                       dasd_device_clear_timer(device);
-                       device->discipline->handle_unsolicited_interrupt(device,
-                                                                        irb);
+               if (IS_ERR(device))
+                       return;
+               /* ignore unsolicited interrupts for DIAG discipline */
+               if (device->discipline == dasd_diag_discipline_pointer) {
                        dasd_put_device(device);
+                       return;
                }
+               device->discipline->dump_sense_dbf(device, irb,
+                                                  "unsolicited");
+               if ((device->features & DASD_FEATURE_ERPLOG))
+                       device->discipline->dump_sense(device, cqr,
+                                                      irb);
+               dasd_device_clear_timer(device);
+               device->discipline->handle_unsolicited_interrupt(device,
+                                                                irb);
+               dasd_put_device(device);
                return;
        }