aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/device.c
diff options
context:
space:
mode:
authorCornelia Huck <cohuck@de.ibm.com>2006-01-06 03:19:21 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:51 -0500
commita8237fc4108060402d904bea5e1062e22e731969 (patch)
treefc19e33ea8bbe664c33fba6c78b34e497f2cc478 /drivers/s390/cio/device.c
parent8129ee164267dc030b8e1d541ee3643c0b9f2fa1 (diff)
[PATCH] s390: introduce struct subchannel_id
This patch introduces a struct subchannel_id containing the subchannel number (formerly referred to as "irq") and switches code formerly relying on the subchannel number over to it. While we're touching inline assemblies anyway, make sure they have correct memory constraints. Signed-off-by: Cornelia Huck <cohuck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r--drivers/s390/cio/device.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 0590cffe62aa..9ac07aeffbe6 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -622,7 +622,7 @@ ccw_device_do_unreg_rereg(void *data)
622 622
623 other_sch = to_subchannel(other_cdev->dev.parent); 623 other_sch = to_subchannel(other_cdev->dev.parent);
624 if (get_device(&other_sch->dev)) { 624 if (get_device(&other_sch->dev)) {
625 stsch(other_sch->irq, &other_sch->schib); 625 stsch(other_sch->schid, &other_sch->schib);
626 if (other_sch->schib.pmcw.dnv) { 626 if (other_sch->schib.pmcw.dnv) {
627 other_sch->schib.pmcw.intparm = 0; 627 other_sch->schib.pmcw.intparm = 0;
628 cio_modify(other_sch); 628 cio_modify(other_sch);
@@ -772,7 +772,7 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
772 /* Init private data. */ 772 /* Init private data. */
773 priv = cdev->private; 773 priv = cdev->private;
774 priv->devno = sch->schib.pmcw.dev; 774 priv->devno = sch->schib.pmcw.dev;
775 priv->irq = sch->irq; 775 priv->sch_no = sch->schid.sch_no;
776 priv->state = DEV_STATE_NOT_OPER; 776 priv->state = DEV_STATE_NOT_OPER;
777 INIT_LIST_HEAD(&priv->cmb_list); 777 INIT_LIST_HEAD(&priv->cmb_list);
778 init_waitqueue_head(&priv->wait_q); 778 init_waitqueue_head(&priv->wait_q);
@@ -951,7 +951,7 @@ io_subchannel_shutdown(struct device *dev)
951 sch = to_subchannel(dev); 951 sch = to_subchannel(dev);
952 cdev = dev->driver_data; 952 cdev = dev->driver_data;
953 953
954 if (cio_is_console(sch->irq)) 954 if (cio_is_console(sch->schid))
955 return; 955 return;
956 if (!sch->schib.pmcw.ena) 956 if (!sch->schib.pmcw.ena)
957 /* Nothing to do. */ 957 /* Nothing to do. */
@@ -1146,6 +1146,16 @@ ccw_driver_unregister (struct ccw_driver *cdriver)
1146 driver_unregister(&cdriver->driver); 1146 driver_unregister(&cdriver->driver);
1147} 1147}
1148 1148
1149/* Helper func for qdio. */
1150struct subchannel_id
1151ccw_device_get_subchannel_id(struct ccw_device *cdev)
1152{
1153 struct subchannel *sch;
1154
1155 sch = to_subchannel(cdev->dev.parent);
1156 return sch->schid;
1157}
1158
1149MODULE_LICENSE("GPL"); 1159MODULE_LICENSE("GPL");
1150EXPORT_SYMBOL(ccw_device_set_online); 1160EXPORT_SYMBOL(ccw_device_set_online);
1151EXPORT_SYMBOL(ccw_device_set_offline); 1161EXPORT_SYMBOL(ccw_device_set_offline);
@@ -1155,3 +1165,4 @@ EXPORT_SYMBOL(get_ccwdev_by_busid);
1155EXPORT_SYMBOL(ccw_bus_type); 1165EXPORT_SYMBOL(ccw_bus_type);
1156EXPORT_SYMBOL(ccw_device_work); 1166EXPORT_SYMBOL(ccw_device_work);
1157EXPORT_SYMBOL(ccw_device_notify_work); 1167EXPORT_SYMBOL(ccw_device_notify_work);
1168EXPORT_SYMBOL_GPL(ccw_device_get_subchannel_id);