diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/device_id.c | 3 | ||||
-rw-r--r-- | drivers/s390/cio/device_ops.c | 32 | ||||
-rw-r--r-- | drivers/s390/cio/qdio.c | 2 |
3 files changed, 33 insertions, 4 deletions
diff --git a/drivers/s390/cio/device_id.c b/drivers/s390/cio/device_id.c index f17275917fe5..997f46874537 100644 --- a/drivers/s390/cio/device_id.c +++ b/drivers/s390/cio/device_id.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | ||
14 | 15 | ||
15 | #include <asm/ccwdev.h> | 16 | #include <asm/ccwdev.h> |
16 | #include <asm/delay.h> | 17 | #include <asm/delay.h> |
@@ -138,7 +139,7 @@ VM_virtual_device_info (__u16 devno, struct senseid *ps) | |||
138 | ps->cu_model = 0x60; | 139 | ps->cu_model = 0x60; |
139 | return; | 140 | return; |
140 | } | 141 | } |
141 | for (i = 0; i < sizeof(vm_devices) / sizeof(vm_devices[0]); i++) | 142 | for (i = 0; i < ARRAY_SIZE(vm_devices); i++) |
142 | if (diag_data.vrdcvcla == vm_devices[i].vrdcvcla && | 143 | if (diag_data.vrdcvcla == vm_devices[i].vrdcvcla && |
143 | diag_data.vrdcvtyp == vm_devices[i].vrdcvtyp) { | 144 | diag_data.vrdcvtyp == vm_devices[i].vrdcvtyp) { |
144 | ps->cu_type = vm_devices[i].cu_type; | 145 | ps->cu_type = vm_devices[i].cu_type; |
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index d7b25b8f71d2..7c7775aae38a 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -23,8 +23,7 @@ | |||
23 | #include "chsc.h" | 23 | #include "chsc.h" |
24 | #include "device.h" | 24 | #include "device.h" |
25 | 25 | ||
26 | int | 26 | int ccw_device_set_options_mask(struct ccw_device *cdev, unsigned long flags) |
27 | ccw_device_set_options(struct ccw_device *cdev, unsigned long flags) | ||
28 | { | 27 | { |
29 | /* | 28 | /* |
30 | * The flag usage is mutal exclusive ... | 29 | * The flag usage is mutal exclusive ... |
@@ -39,6 +38,33 @@ ccw_device_set_options(struct ccw_device *cdev, unsigned long flags) | |||
39 | return 0; | 38 | return 0; |
40 | } | 39 | } |
41 | 40 | ||
41 | int ccw_device_set_options(struct ccw_device *cdev, unsigned long flags) | ||
42 | { | ||
43 | /* | ||
44 | * The flag usage is mutal exclusive ... | ||
45 | */ | ||
46 | if (((flags & CCWDEV_EARLY_NOTIFICATION) && | ||
47 | (flags & CCWDEV_REPORT_ALL)) || | ||
48 | ((flags & CCWDEV_EARLY_NOTIFICATION) && | ||
49 | cdev->private->options.repall) || | ||
50 | ((flags & CCWDEV_REPORT_ALL) && | ||
51 | cdev->private->options.fast)) | ||
52 | return -EINVAL; | ||
53 | cdev->private->options.fast |= (flags & CCWDEV_EARLY_NOTIFICATION) != 0; | ||
54 | cdev->private->options.repall |= (flags & CCWDEV_REPORT_ALL) != 0; | ||
55 | cdev->private->options.pgroup |= (flags & CCWDEV_DO_PATHGROUP) != 0; | ||
56 | cdev->private->options.force |= (flags & CCWDEV_ALLOW_FORCE) != 0; | ||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | void ccw_device_clear_options(struct ccw_device *cdev, unsigned long flags) | ||
61 | { | ||
62 | cdev->private->options.fast &= (flags & CCWDEV_EARLY_NOTIFICATION) == 0; | ||
63 | cdev->private->options.repall &= (flags & CCWDEV_REPORT_ALL) == 0; | ||
64 | cdev->private->options.pgroup &= (flags & CCWDEV_DO_PATHGROUP) == 0; | ||
65 | cdev->private->options.force &= (flags & CCWDEV_ALLOW_FORCE) == 0; | ||
66 | } | ||
67 | |||
42 | int | 68 | int |
43 | ccw_device_clear(struct ccw_device *cdev, unsigned long intparm) | 69 | ccw_device_clear(struct ccw_device *cdev, unsigned long intparm) |
44 | { | 70 | { |
@@ -601,7 +627,9 @@ _ccw_device_get_device_number(struct ccw_device *cdev) | |||
601 | 627 | ||
602 | 628 | ||
603 | MODULE_LICENSE("GPL"); | 629 | MODULE_LICENSE("GPL"); |
630 | EXPORT_SYMBOL(ccw_device_set_options_mask); | ||
604 | EXPORT_SYMBOL(ccw_device_set_options); | 631 | EXPORT_SYMBOL(ccw_device_set_options); |
632 | EXPORT_SYMBOL(ccw_device_clear_options); | ||
605 | EXPORT_SYMBOL(ccw_device_clear); | 633 | EXPORT_SYMBOL(ccw_device_clear); |
606 | EXPORT_SYMBOL(ccw_device_halt); | 634 | EXPORT_SYMBOL(ccw_device_halt); |
607 | EXPORT_SYMBOL(ccw_device_resume); | 635 | EXPORT_SYMBOL(ccw_device_resume); |
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index d726cd5777de..5b1e3ff26c0b 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c | |||
@@ -3194,7 +3194,7 @@ qdio_establish(struct qdio_initialize *init_data) | |||
3194 | 3194 | ||
3195 | spin_lock_irqsave(get_ccwdev_lock(cdev),saveflags); | 3195 | spin_lock_irqsave(get_ccwdev_lock(cdev),saveflags); |
3196 | 3196 | ||
3197 | ccw_device_set_options(cdev, 0); | 3197 | ccw_device_set_options_mask(cdev, 0); |
3198 | result=ccw_device_start_timeout(cdev,&irq_ptr->ccw, | 3198 | result=ccw_device_start_timeout(cdev,&irq_ptr->ccw, |
3199 | QDIO_DOING_ESTABLISH,0, 0, | 3199 | QDIO_DOING_ESTABLISH,0, 0, |
3200 | QDIO_ESTABLISH_TIMEOUT); | 3200 | QDIO_ESTABLISH_TIMEOUT); |