aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2014-01-27 07:29:15 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-02-21 02:50:13 -0500
commit137a14f434705a366cc94b2b32f2488c975863ad (patch)
treec96cb1dc2842395e5b27b026a731add396940676 /drivers/s390/cio
parent1e5320960510d6d6f2cbdc7ed33df9791283b7ea (diff)
s390/cio: fix irq stats for early interrupts on ccw consoles
Interrupts which happen on ccw consoles prior to their registration with the driver core are not accounted to the respective device driver. Fix this by setting the proper interrupt class during initialization of ccw consoles. Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/device.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index da431992fd8e..d8d9b5b5cc56 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1571,6 +1571,18 @@ out:
1571 return rc; 1571 return rc;
1572} 1572}
1573 1573
1574static void ccw_device_set_int_class(struct ccw_device *cdev)
1575{
1576 struct ccw_driver *cdrv = cdev->drv;
1577
1578 /* Note: we interpret class 0 in this context as an uninitialized
1579 * field since it translates to a non-I/O interrupt class. */
1580 if (cdrv->int_class != 0)
1581 cdev->private->int_class = cdrv->int_class;
1582 else
1583 cdev->private->int_class = IRQIO_CIO;
1584}
1585
1574#ifdef CONFIG_CCW_CONSOLE 1586#ifdef CONFIG_CCW_CONSOLE
1575int __init ccw_device_enable_console(struct ccw_device *cdev) 1587int __init ccw_device_enable_console(struct ccw_device *cdev)
1576{ 1588{
@@ -1635,6 +1647,7 @@ struct ccw_device * __init ccw_device_create_console(struct ccw_driver *drv)
1635 } 1647 }
1636 cdev->drv = drv; 1648 cdev->drv = drv;
1637 set_io_private(sch, io_priv); 1649 set_io_private(sch, io_priv);
1650 ccw_device_set_int_class(cdev);
1638 return cdev; 1651 return cdev;
1639} 1652}
1640 1653
@@ -1732,15 +1745,8 @@ ccw_device_probe (struct device *dev)
1732 int ret; 1745 int ret;
1733 1746
1734 cdev->drv = cdrv; /* to let the driver call _set_online */ 1747 cdev->drv = cdrv; /* to let the driver call _set_online */
1735 /* Note: we interpret class 0 in this context as an uninitialized 1748 ccw_device_set_int_class(cdev);
1736 * field since it translates to a non-I/O interrupt class. */
1737 if (cdrv->int_class != 0)
1738 cdev->private->int_class = cdrv->int_class;
1739 else
1740 cdev->private->int_class = IRQIO_CIO;
1741
1742 ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV; 1749 ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV;
1743
1744 if (ret) { 1750 if (ret) {
1745 cdev->drv = NULL; 1751 cdev->drv = NULL;
1746 cdev->private->int_class = IRQIO_CIO; 1752 cdev->private->int_class = IRQIO_CIO;