aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2012-10-29 11:50:20 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-11-23 05:14:28 -0500
commit287a0933237a227d1d6508de0ad6425b55a60476 (patch)
treed4b15f799b6858a07114f85cd1cbdb8e8d5e4259
parent9368dac4367cd9a61ef75a745c6e26d0dd164172 (diff)
s390: use ccw_device_get_schid
Let the dasd driver and qdio use ccw_device_get_schid and get rid of other similar functions. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/include/asm/ccwdev.h3
-rw-r--r--drivers/s390/block/dasd_ioctl.c11
-rw-r--r--drivers/s390/cio/device.c11
-rw-r--r--drivers/s390/cio/device.h2
-rw-r--r--drivers/s390/cio/device_ops.c9
-rw-r--r--drivers/s390/cio/qdio_setup.c3
6 files changed, 8 insertions, 31 deletions
diff --git a/arch/s390/include/asm/ccwdev.h b/arch/s390/include/asm/ccwdev.h
index 9ad79f7f1acc..6d1f3573f0df 100644
--- a/arch/s390/include/asm/ccwdev.h
+++ b/arch/s390/include/asm/ccwdev.h
@@ -226,9 +226,6 @@ extern int ccw_device_force_console(void);
226 226
227int ccw_device_siosl(struct ccw_device *); 227int ccw_device_siosl(struct ccw_device *);
228 228
229// FIXME: these have to go
230extern int _ccw_device_get_subchannel_number(struct ccw_device *);
231
232extern void ccw_device_get_schid(struct ccw_device *, struct subchannel_id *); 229extern void ccw_device_get_schid(struct ccw_device *, struct subchannel_id *);
233 230
234extern void *ccw_device_get_chp_desc(struct ccw_device *, int); 231extern void *ccw_device_get_chp_desc(struct ccw_device *, int);
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index 8252f37d04ed..03c0e0444553 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -19,6 +19,7 @@
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <asm/compat.h> 20#include <asm/compat.h>
21#include <asm/ccwdev.h> 21#include <asm/ccwdev.h>
22#include <asm/schid.h>
22#include <asm/cmb.h> 23#include <asm/cmb.h>
23#include <asm/uaccess.h> 24#include <asm/uaccess.h>
24 25
@@ -308,11 +309,12 @@ static int dasd_ioctl_information(struct dasd_block *block,
308 unsigned int cmd, void __user *argp) 309 unsigned int cmd, void __user *argp)
309{ 310{
310 struct dasd_information2_t *dasd_info; 311 struct dasd_information2_t *dasd_info;
311 unsigned long flags; 312 struct subchannel_id sch_id;
312 int rc; 313 struct ccw_dev_id dev_id;
313 struct dasd_device *base; 314 struct dasd_device *base;
314 struct ccw_device *cdev; 315 struct ccw_device *cdev;
315 struct ccw_dev_id dev_id; 316 unsigned long flags;
317 int rc;
316 318
317 base = block->base; 319 base = block->base;
318 if (!base->discipline || !base->discipline->fill_info) 320 if (!base->discipline || !base->discipline->fill_info)
@@ -330,9 +332,10 @@ static int dasd_ioctl_information(struct dasd_block *block,
330 332
331 cdev = base->cdev; 333 cdev = base->cdev;
332 ccw_device_get_id(cdev, &dev_id); 334 ccw_device_get_id(cdev, &dev_id);
335 ccw_device_get_schid(cdev, &sch_id);
333 336
334 dasd_info->devno = dev_id.devno; 337 dasd_info->devno = dev_id.devno;
335 dasd_info->schid = _ccw_device_get_subchannel_number(base->cdev); 338 dasd_info->schid = sch_id.sch_no;
336 dasd_info->cu_type = cdev->id.cu_type; 339 dasd_info->cu_type = cdev->id.cu_type;
337 dasd_info->cu_model = cdev->id.cu_model; 340 dasd_info->cu_model = cdev->id.cu_model;
338 dasd_info->dev_type = cdev->id.dev_type; 341 dasd_info->dev_type = cdev->id.dev_type;
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index fd3143c291c6..6995cff44636 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -2036,16 +2036,6 @@ void ccw_driver_unregister(struct ccw_driver *cdriver)
2036 driver_unregister(&cdriver->driver); 2036 driver_unregister(&cdriver->driver);
2037} 2037}
2038 2038
2039/* Helper func for qdio. */
2040struct subchannel_id
2041ccw_device_get_subchannel_id(struct ccw_device *cdev)
2042{
2043 struct subchannel *sch;
2044
2045 sch = to_subchannel(cdev->dev.parent);
2046 return sch->schid;
2047}
2048
2049static void ccw_device_todo(struct work_struct *work) 2039static void ccw_device_todo(struct work_struct *work)
2050{ 2040{
2051 struct ccw_device_private *priv; 2041 struct ccw_device_private *priv;
@@ -2138,4 +2128,3 @@ EXPORT_SYMBOL(ccw_device_set_offline);
2138EXPORT_SYMBOL(ccw_driver_register); 2128EXPORT_SYMBOL(ccw_driver_register);
2139EXPORT_SYMBOL(ccw_driver_unregister); 2129EXPORT_SYMBOL(ccw_driver_unregister);
2140EXPORT_SYMBOL(get_ccwdev_by_busid); 2130EXPORT_SYMBOL(get_ccwdev_by_busid);
2141EXPORT_SYMBOL_GPL(ccw_device_get_subchannel_id);
diff --git a/drivers/s390/cio/device.h b/drivers/s390/cio/device.h
index 6bace6942396..2e575cff9845 100644
--- a/drivers/s390/cio/device.h
+++ b/drivers/s390/cio/device.h
@@ -142,9 +142,7 @@ int ccw_device_notify(struct ccw_device *, int);
142void ccw_device_set_disconnected(struct ccw_device *cdev); 142void ccw_device_set_disconnected(struct ccw_device *cdev);
143void ccw_device_set_notoper(struct ccw_device *cdev); 143void ccw_device_set_notoper(struct ccw_device *cdev);
144 144
145/* qdio needs this. */
146void ccw_device_set_timeout(struct ccw_device *, int); 145void ccw_device_set_timeout(struct ccw_device *, int);
147extern struct subchannel_id ccw_device_get_subchannel_id(struct ccw_device *);
148 146
149/* Channel measurement facility related */ 147/* Channel measurement facility related */
150void retry_set_schib(struct ccw_device *cdev); 148void retry_set_schib(struct ccw_device *cdev);
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c
index 2ad832f8e340..c77b6e06bf64 100644
--- a/drivers/s390/cio/device_ops.c
+++ b/drivers/s390/cio/device_ops.c
@@ -755,14 +755,6 @@ int ccw_device_tm_intrg(struct ccw_device *cdev)
755} 755}
756EXPORT_SYMBOL(ccw_device_tm_intrg); 756EXPORT_SYMBOL(ccw_device_tm_intrg);
757 757
758// FIXME: these have to go:
759
760int
761_ccw_device_get_subchannel_number(struct ccw_device *cdev)
762{
763 return cdev->private->schid.sch_no;
764}
765
766/** 758/**
767 * ccw_device_get_schid - obtain a subchannel id 759 * ccw_device_get_schid - obtain a subchannel id
768 * @cdev: device to obtain the id for 760 * @cdev: device to obtain the id for
@@ -789,5 +781,4 @@ EXPORT_SYMBOL(ccw_device_start_timeout_key);
789EXPORT_SYMBOL(ccw_device_start_key); 781EXPORT_SYMBOL(ccw_device_start_key);
790EXPORT_SYMBOL(ccw_device_get_ciw); 782EXPORT_SYMBOL(ccw_device_get_ciw);
791EXPORT_SYMBOL(ccw_device_get_path_mask); 783EXPORT_SYMBOL(ccw_device_get_path_mask);
792EXPORT_SYMBOL(_ccw_device_get_subchannel_number);
793EXPORT_SYMBOL_GPL(ccw_device_get_chp_desc); 784EXPORT_SYMBOL_GPL(ccw_device_get_chp_desc);
diff --git a/drivers/s390/cio/qdio_setup.c b/drivers/s390/cio/qdio_setup.c
index 6559564ebe36..31ddb966e2c0 100644
--- a/drivers/s390/cio/qdio_setup.c
+++ b/drivers/s390/cio/qdio_setup.c
@@ -432,9 +432,8 @@ int qdio_setup_irq(struct qdio_initialize *init_data)
432 irq_ptr->int_parm = init_data->int_parm; 432 irq_ptr->int_parm = init_data->int_parm;
433 irq_ptr->nr_input_qs = init_data->no_input_qs; 433 irq_ptr->nr_input_qs = init_data->no_input_qs;
434 irq_ptr->nr_output_qs = init_data->no_output_qs; 434 irq_ptr->nr_output_qs = init_data->no_output_qs;
435
436 irq_ptr->schid = ccw_device_get_subchannel_id(init_data->cdev);
437 irq_ptr->cdev = init_data->cdev; 435 irq_ptr->cdev = init_data->cdev;
436 ccw_device_get_schid(irq_ptr->cdev, &irq_ptr->schid);
438 setup_queues(irq_ptr, init_data); 437 setup_queues(irq_ptr, init_data);
439 438
440 setup_qib(irq_ptr, init_data); 439 setup_qib(irq_ptr, init_data);