Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Sebastian Ott | 823d494 | 2009-06-16 10:30:20 +0200 | [diff] [blame] | 2 | * Copyright IBM Corp. 2002, 2009 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * |
Sebastian Ott | 823d494 | 2009-06-16 10:30:20 +0200 | [diff] [blame] | 4 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) |
| 5 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
Paul Gortmaker | a00f761 | 2016-10-30 16:37:24 -0400 | [diff] [blame] | 6 | * |
| 7 | * License: GPL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | */ |
Paul Gortmaker | a00f761 | 2016-10-30 16:37:24 -0400 | [diff] [blame] | 9 | #include <linux/export.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #include <linux/init.h> |
| 11 | #include <linux/errno.h> |
| 12 | #include <linux/slab.h> |
| 13 | #include <linux/list.h> |
| 14 | #include <linux/device.h> |
| 15 | #include <linux/delay.h> |
Peter Oberparleiter | d7d12ef | 2009-12-07 12:51:32 +0100 | [diff] [blame] | 16 | #include <linux/completion.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | |
| 18 | #include <asm/ccwdev.h> |
| 19 | #include <asm/idals.h> |
Peter Oberparleiter | e5854a5 | 2007-04-27 16:01:31 +0200 | [diff] [blame] | 20 | #include <asm/chpid.h> |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 21 | #include <asm/fcx.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | |
| 23 | #include "cio.h" |
| 24 | #include "cio_debug.h" |
| 25 | #include "css.h" |
| 26 | #include "chsc.h" |
| 27 | #include "device.h" |
Peter Oberparleiter | e6b6e10 | 2007-04-27 16:01:28 +0200 | [diff] [blame] | 28 | #include "chp.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 30 | /** |
| 31 | * ccw_device_set_options_mask() - set some options and unset the rest |
| 32 | * @cdev: device for which the options are to be set |
| 33 | * @flags: options to be set |
| 34 | * |
| 35 | * All flags specified in @flags are set, all flags not specified in @flags |
| 36 | * are cleared. |
| 37 | * Returns: |
| 38 | * %0 on success, -%EINVAL on an invalid flag combination. |
| 39 | */ |
Cornelia Huck | 4dd3cc5 | 2007-02-12 15:47:18 +0100 | [diff] [blame] | 40 | int ccw_device_set_options_mask(struct ccw_device *cdev, unsigned long flags) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | { |
| 42 | /* |
| 43 | * The flag usage is mutal exclusive ... |
| 44 | */ |
| 45 | if ((flags & CCWDEV_EARLY_NOTIFICATION) && |
| 46 | (flags & CCWDEV_REPORT_ALL)) |
| 47 | return -EINVAL; |
| 48 | cdev->private->options.fast = (flags & CCWDEV_EARLY_NOTIFICATION) != 0; |
| 49 | cdev->private->options.repall = (flags & CCWDEV_REPORT_ALL) != 0; |
| 50 | cdev->private->options.pgroup = (flags & CCWDEV_DO_PATHGROUP) != 0; |
| 51 | cdev->private->options.force = (flags & CCWDEV_ALLOW_FORCE) != 0; |
Peter Oberparleiter | 454e1fa | 2009-12-07 12:51:30 +0100 | [diff] [blame] | 52 | cdev->private->options.mpath = (flags & CCWDEV_DO_MULTIPATH) != 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | return 0; |
| 54 | } |
| 55 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 56 | /** |
| 57 | * ccw_device_set_options() - set some options |
| 58 | * @cdev: device for which the options are to be set |
| 59 | * @flags: options to be set |
| 60 | * |
| 61 | * All flags specified in @flags are set, the remainder is left untouched. |
| 62 | * Returns: |
| 63 | * %0 on success, -%EINVAL if an invalid flag combination would ensue. |
| 64 | */ |
Cornelia Huck | 4dd3cc5 | 2007-02-12 15:47:18 +0100 | [diff] [blame] | 65 | int ccw_device_set_options(struct ccw_device *cdev, unsigned long flags) |
| 66 | { |
| 67 | /* |
| 68 | * The flag usage is mutal exclusive ... |
| 69 | */ |
| 70 | if (((flags & CCWDEV_EARLY_NOTIFICATION) && |
| 71 | (flags & CCWDEV_REPORT_ALL)) || |
| 72 | ((flags & CCWDEV_EARLY_NOTIFICATION) && |
| 73 | cdev->private->options.repall) || |
| 74 | ((flags & CCWDEV_REPORT_ALL) && |
| 75 | cdev->private->options.fast)) |
| 76 | return -EINVAL; |
| 77 | cdev->private->options.fast |= (flags & CCWDEV_EARLY_NOTIFICATION) != 0; |
| 78 | cdev->private->options.repall |= (flags & CCWDEV_REPORT_ALL) != 0; |
| 79 | cdev->private->options.pgroup |= (flags & CCWDEV_DO_PATHGROUP) != 0; |
| 80 | cdev->private->options.force |= (flags & CCWDEV_ALLOW_FORCE) != 0; |
Peter Oberparleiter | 454e1fa | 2009-12-07 12:51:30 +0100 | [diff] [blame] | 81 | cdev->private->options.mpath |= (flags & CCWDEV_DO_MULTIPATH) != 0; |
Cornelia Huck | 4dd3cc5 | 2007-02-12 15:47:18 +0100 | [diff] [blame] | 82 | return 0; |
| 83 | } |
| 84 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 85 | /** |
| 86 | * ccw_device_clear_options() - clear some options |
| 87 | * @cdev: device for which the options are to be cleared |
| 88 | * @flags: options to be cleared |
| 89 | * |
| 90 | * All flags specified in @flags are cleared, the remainder is left untouched. |
| 91 | */ |
Cornelia Huck | 4dd3cc5 | 2007-02-12 15:47:18 +0100 | [diff] [blame] | 92 | void ccw_device_clear_options(struct ccw_device *cdev, unsigned long flags) |
| 93 | { |
| 94 | cdev->private->options.fast &= (flags & CCWDEV_EARLY_NOTIFICATION) == 0; |
| 95 | cdev->private->options.repall &= (flags & CCWDEV_REPORT_ALL) == 0; |
| 96 | cdev->private->options.pgroup &= (flags & CCWDEV_DO_PATHGROUP) == 0; |
| 97 | cdev->private->options.force &= (flags & CCWDEV_ALLOW_FORCE) == 0; |
Peter Oberparleiter | 454e1fa | 2009-12-07 12:51:30 +0100 | [diff] [blame] | 98 | cdev->private->options.mpath &= (flags & CCWDEV_DO_MULTIPATH) == 0; |
Cornelia Huck | 4dd3cc5 | 2007-02-12 15:47:18 +0100 | [diff] [blame] | 99 | } |
| 100 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 101 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 102 | * ccw_device_is_pathgroup() - determine if paths to this device are grouped |
Peter Oberparleiter | 454e1fa | 2009-12-07 12:51:30 +0100 | [diff] [blame] | 103 | * @cdev: ccw device |
| 104 | * |
| 105 | * Return non-zero if there is a path group, zero otherwise. |
| 106 | */ |
| 107 | int ccw_device_is_pathgroup(struct ccw_device *cdev) |
| 108 | { |
| 109 | return cdev->private->flags.pgroup; |
| 110 | } |
| 111 | EXPORT_SYMBOL(ccw_device_is_pathgroup); |
| 112 | |
| 113 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 114 | * ccw_device_is_multipath() - determine if device is operating in multipath mode |
Peter Oberparleiter | 454e1fa | 2009-12-07 12:51:30 +0100 | [diff] [blame] | 115 | * @cdev: ccw device |
| 116 | * |
| 117 | * Return non-zero if device is operating in multipath mode, zero otherwise. |
| 118 | */ |
| 119 | int ccw_device_is_multipath(struct ccw_device *cdev) |
| 120 | { |
| 121 | return cdev->private->flags.mpath; |
| 122 | } |
| 123 | EXPORT_SYMBOL(ccw_device_is_multipath); |
| 124 | |
| 125 | /** |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 126 | * ccw_device_clear() - terminate I/O request processing |
| 127 | * @cdev: target ccw device |
| 128 | * @intparm: interruption parameter; value is only used if no I/O is |
| 129 | * outstanding, otherwise the intparm associated with the I/O request |
| 130 | * is returned |
| 131 | * |
| 132 | * ccw_device_clear() calls csch on @cdev's subchannel. |
| 133 | * Returns: |
| 134 | * %0 on success, |
| 135 | * -%ENODEV on device not operational, |
| 136 | * -%EINVAL on invalid device state. |
| 137 | * Context: |
| 138 | * Interrupts disabled, ccw device lock held |
| 139 | */ |
| 140 | int ccw_device_clear(struct ccw_device *cdev, unsigned long intparm) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 141 | { |
| 142 | struct subchannel *sch; |
| 143 | int ret; |
| 144 | |
Sebastian Ott | e45efa9 | 2009-06-12 10:26:27 +0200 | [diff] [blame] | 145 | if (!cdev || !cdev->dev.parent) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | return -ENODEV; |
Sebastian Ott | 823d494 | 2009-06-16 10:30:20 +0200 | [diff] [blame] | 147 | sch = to_subchannel(cdev->dev.parent); |
| 148 | if (!sch->schib.pmcw.ena) |
| 149 | return -EINVAL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 150 | if (cdev->private->state == DEV_STATE_NOT_OPER) |
| 151 | return -ENODEV; |
| 152 | if (cdev->private->state != DEV_STATE_ONLINE && |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 153 | cdev->private->state != DEV_STATE_W4SENSE) |
| 154 | return -EINVAL; |
Sebastian Ott | 823d494 | 2009-06-16 10:30:20 +0200 | [diff] [blame] | 155 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | ret = cio_clear(sch); |
| 157 | if (ret == 0) |
| 158 | cdev->private->intparm = intparm; |
| 159 | return ret; |
| 160 | } |
| 161 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 162 | /** |
| 163 | * ccw_device_start_key() - start a s390 channel program with key |
| 164 | * @cdev: target ccw device |
| 165 | * @cpa: logical start address of channel program |
| 166 | * @intparm: user specific interruption parameter; will be presented back to |
| 167 | * @cdev's interrupt handler. Allows a device driver to associate |
| 168 | * the interrupt with a particular I/O request. |
| 169 | * @lpm: defines the channel path to be used for a specific I/O request. A |
| 170 | * value of 0 will make cio use the opm. |
| 171 | * @key: storage key to be used for the I/O |
| 172 | * @flags: additional flags; defines the action to be performed for I/O |
| 173 | * processing. |
| 174 | * |
| 175 | * Start a S/390 channel program. When the interrupt arrives, the |
| 176 | * IRQ handler is called, either immediately, delayed (dev-end missing, |
| 177 | * or sense required) or never (no IRQ handler registered). |
| 178 | * Returns: |
| 179 | * %0, if the operation was successful; |
| 180 | * -%EBUSY, if the device is busy, or status pending; |
| 181 | * -%EACCES, if no path specified in @lpm is operational; |
| 182 | * -%ENODEV, if the device is not operational. |
| 183 | * Context: |
| 184 | * Interrupts disabled, ccw device lock held |
| 185 | */ |
| 186 | int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa, |
| 187 | unsigned long intparm, __u8 lpm, __u8 key, |
| 188 | unsigned long flags) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | { |
| 190 | struct subchannel *sch; |
| 191 | int ret; |
| 192 | |
Sebastian Ott | e45efa9 | 2009-06-12 10:26:27 +0200 | [diff] [blame] | 193 | if (!cdev || !cdev->dev.parent) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 194 | return -ENODEV; |
| 195 | sch = to_subchannel(cdev->dev.parent); |
Sebastian Ott | 823d494 | 2009-06-16 10:30:20 +0200 | [diff] [blame] | 196 | if (!sch->schib.pmcw.ena) |
| 197 | return -EINVAL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 198 | if (cdev->private->state == DEV_STATE_NOT_OPER) |
| 199 | return -ENODEV; |
Peter Oberparleiter | 4257aae | 2009-12-07 12:51:29 +0100 | [diff] [blame] | 200 | if (cdev->private->state == DEV_STATE_VERIFY) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 201 | /* Remember to fake irb when finished. */ |
| 202 | if (!cdev->private->flags.fake_irb) { |
Sebastian Ott | 50c8e31 | 2011-12-01 13:32:21 +0100 | [diff] [blame] | 203 | cdev->private->flags.fake_irb = FAKE_CMD_IRB; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 204 | cdev->private->intparm = intparm; |
| 205 | return 0; |
| 206 | } else |
| 207 | /* There's already a fake I/O around. */ |
| 208 | return -EBUSY; |
| 209 | } |
| 210 | if (cdev->private->state != DEV_STATE_ONLINE || |
Peter Oberparleiter | 23d805b6 | 2008-07-14 09:58:50 +0200 | [diff] [blame] | 211 | ((sch->schib.scsw.cmd.stctl & SCSW_STCTL_PRIM_STATUS) && |
| 212 | !(sch->schib.scsw.cmd.stctl & SCSW_STCTL_SEC_STATUS)) || |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 213 | cdev->private->flags.doverify) |
| 214 | return -EBUSY; |
| 215 | ret = cio_set_options (sch, flags); |
| 216 | if (ret) |
| 217 | return ret; |
Sebastian Ott | 659213b | 2011-12-01 13:32:20 +0100 | [diff] [blame] | 218 | /* Adjust requested path mask to exclude unusable paths. */ |
Peter Oberparleiter | e0e32c8 | 2006-09-20 15:59:57 +0200 | [diff] [blame] | 219 | if (lpm) { |
Sebastian Ott | 659213b | 2011-12-01 13:32:20 +0100 | [diff] [blame] | 220 | lpm &= sch->lpm; |
Peter Oberparleiter | e0e32c8 | 2006-09-20 15:59:57 +0200 | [diff] [blame] | 221 | if (lpm == 0) |
| 222 | return -EACCES; |
| 223 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | ret = cio_start_key (sch, cpa, lpm, key); |
Cornelia Huck | fe6173d | 2008-04-17 07:46:00 +0200 | [diff] [blame] | 225 | switch (ret) { |
| 226 | case 0: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 227 | cdev->private->intparm = intparm; |
Cornelia Huck | fe6173d | 2008-04-17 07:46:00 +0200 | [diff] [blame] | 228 | break; |
| 229 | case -EACCES: |
| 230 | case -ENODEV: |
| 231 | dev_fsm_event(cdev, DEV_EVENT_VERIFY); |
| 232 | break; |
| 233 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 234 | return ret; |
| 235 | } |
| 236 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 237 | /** |
| 238 | * ccw_device_start_timeout_key() - start a s390 channel program with timeout and key |
| 239 | * @cdev: target ccw device |
| 240 | * @cpa: logical start address of channel program |
| 241 | * @intparm: user specific interruption parameter; will be presented back to |
| 242 | * @cdev's interrupt handler. Allows a device driver to associate |
| 243 | * the interrupt with a particular I/O request. |
| 244 | * @lpm: defines the channel path to be used for a specific I/O request. A |
| 245 | * value of 0 will make cio use the opm. |
| 246 | * @key: storage key to be used for the I/O |
| 247 | * @flags: additional flags; defines the action to be performed for I/O |
| 248 | * processing. |
| 249 | * @expires: timeout value in jiffies |
| 250 | * |
| 251 | * Start a S/390 channel program. When the interrupt arrives, the |
| 252 | * IRQ handler is called, either immediately, delayed (dev-end missing, |
| 253 | * or sense required) or never (no IRQ handler registered). |
| 254 | * This function notifies the device driver if the channel program has not |
| 255 | * completed during the time specified by @expires. If a timeout occurs, the |
| 256 | * channel program is terminated via xsch, hsch or csch, and the device's |
| 257 | * interrupt handler will be called with an irb containing ERR_PTR(-%ETIMEDOUT). |
| 258 | * Returns: |
| 259 | * %0, if the operation was successful; |
| 260 | * -%EBUSY, if the device is busy, or status pending; |
| 261 | * -%EACCES, if no path specified in @lpm is operational; |
| 262 | * -%ENODEV, if the device is not operational. |
| 263 | * Context: |
| 264 | * Interrupts disabled, ccw device lock held |
| 265 | */ |
| 266 | int ccw_device_start_timeout_key(struct ccw_device *cdev, struct ccw1 *cpa, |
| 267 | unsigned long intparm, __u8 lpm, __u8 key, |
| 268 | unsigned long flags, int expires) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 269 | { |
| 270 | int ret; |
| 271 | |
| 272 | if (!cdev) |
| 273 | return -ENODEV; |
| 274 | ccw_device_set_timeout(cdev, expires); |
| 275 | ret = ccw_device_start_key(cdev, cpa, intparm, lpm, key, flags); |
| 276 | if (ret != 0) |
| 277 | ccw_device_set_timeout(cdev, 0); |
| 278 | return ret; |
| 279 | } |
| 280 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 281 | /** |
| 282 | * ccw_device_start() - start a s390 channel program |
| 283 | * @cdev: target ccw device |
| 284 | * @cpa: logical start address of channel program |
| 285 | * @intparm: user specific interruption parameter; will be presented back to |
| 286 | * @cdev's interrupt handler. Allows a device driver to associate |
| 287 | * the interrupt with a particular I/O request. |
| 288 | * @lpm: defines the channel path to be used for a specific I/O request. A |
| 289 | * value of 0 will make cio use the opm. |
| 290 | * @flags: additional flags; defines the action to be performed for I/O |
| 291 | * processing. |
| 292 | * |
| 293 | * Start a S/390 channel program. When the interrupt arrives, the |
| 294 | * IRQ handler is called, either immediately, delayed (dev-end missing, |
| 295 | * or sense required) or never (no IRQ handler registered). |
| 296 | * Returns: |
| 297 | * %0, if the operation was successful; |
| 298 | * -%EBUSY, if the device is busy, or status pending; |
| 299 | * -%EACCES, if no path specified in @lpm is operational; |
| 300 | * -%ENODEV, if the device is not operational. |
| 301 | * Context: |
| 302 | * Interrupts disabled, ccw device lock held |
| 303 | */ |
| 304 | int ccw_device_start(struct ccw_device *cdev, struct ccw1 *cpa, |
| 305 | unsigned long intparm, __u8 lpm, unsigned long flags) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 306 | { |
| 307 | return ccw_device_start_key(cdev, cpa, intparm, lpm, |
Peter Oberparleiter | 0b642ed | 2005-05-01 08:58:58 -0700 | [diff] [blame] | 308 | PAGE_DEFAULT_KEY, flags); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 309 | } |
| 310 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 311 | /** |
| 312 | * ccw_device_start_timeout() - start a s390 channel program with timeout |
| 313 | * @cdev: target ccw device |
| 314 | * @cpa: logical start address of channel program |
| 315 | * @intparm: user specific interruption parameter; will be presented back to |
| 316 | * @cdev's interrupt handler. Allows a device driver to associate |
| 317 | * the interrupt with a particular I/O request. |
| 318 | * @lpm: defines the channel path to be used for a specific I/O request. A |
| 319 | * value of 0 will make cio use the opm. |
| 320 | * @flags: additional flags; defines the action to be performed for I/O |
| 321 | * processing. |
| 322 | * @expires: timeout value in jiffies |
| 323 | * |
| 324 | * Start a S/390 channel program. When the interrupt arrives, the |
| 325 | * IRQ handler is called, either immediately, delayed (dev-end missing, |
| 326 | * or sense required) or never (no IRQ handler registered). |
| 327 | * This function notifies the device driver if the channel program has not |
| 328 | * completed during the time specified by @expires. If a timeout occurs, the |
| 329 | * channel program is terminated via xsch, hsch or csch, and the device's |
| 330 | * interrupt handler will be called with an irb containing ERR_PTR(-%ETIMEDOUT). |
| 331 | * Returns: |
| 332 | * %0, if the operation was successful; |
| 333 | * -%EBUSY, if the device is busy, or status pending; |
| 334 | * -%EACCES, if no path specified in @lpm is operational; |
| 335 | * -%ENODEV, if the device is not operational. |
| 336 | * Context: |
| 337 | * Interrupts disabled, ccw device lock held |
| 338 | */ |
| 339 | int ccw_device_start_timeout(struct ccw_device *cdev, struct ccw1 *cpa, |
| 340 | unsigned long intparm, __u8 lpm, |
| 341 | unsigned long flags, int expires) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 342 | { |
| 343 | return ccw_device_start_timeout_key(cdev, cpa, intparm, lpm, |
Peter Oberparleiter | 0b642ed | 2005-05-01 08:58:58 -0700 | [diff] [blame] | 344 | PAGE_DEFAULT_KEY, flags, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 345 | expires); |
| 346 | } |
| 347 | |
| 348 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 349 | /** |
| 350 | * ccw_device_halt() - halt I/O request processing |
| 351 | * @cdev: target ccw device |
| 352 | * @intparm: interruption parameter; value is only used if no I/O is |
| 353 | * outstanding, otherwise the intparm associated with the I/O request |
| 354 | * is returned |
| 355 | * |
| 356 | * ccw_device_halt() calls hsch on @cdev's subchannel. |
| 357 | * Returns: |
| 358 | * %0 on success, |
| 359 | * -%ENODEV on device not operational, |
| 360 | * -%EINVAL on invalid device state, |
| 361 | * -%EBUSY on device busy or interrupt pending. |
| 362 | * Context: |
| 363 | * Interrupts disabled, ccw device lock held |
| 364 | */ |
| 365 | int ccw_device_halt(struct ccw_device *cdev, unsigned long intparm) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 366 | { |
| 367 | struct subchannel *sch; |
| 368 | int ret; |
| 369 | |
Sebastian Ott | e45efa9 | 2009-06-12 10:26:27 +0200 | [diff] [blame] | 370 | if (!cdev || !cdev->dev.parent) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 371 | return -ENODEV; |
Sebastian Ott | 823d494 | 2009-06-16 10:30:20 +0200 | [diff] [blame] | 372 | sch = to_subchannel(cdev->dev.parent); |
| 373 | if (!sch->schib.pmcw.ena) |
| 374 | return -EINVAL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 375 | if (cdev->private->state == DEV_STATE_NOT_OPER) |
| 376 | return -ENODEV; |
| 377 | if (cdev->private->state != DEV_STATE_ONLINE && |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 378 | cdev->private->state != DEV_STATE_W4SENSE) |
| 379 | return -EINVAL; |
Sebastian Ott | 823d494 | 2009-06-16 10:30:20 +0200 | [diff] [blame] | 380 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 381 | ret = cio_halt(sch); |
| 382 | if (ret == 0) |
| 383 | cdev->private->intparm = intparm; |
| 384 | return ret; |
| 385 | } |
| 386 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 387 | /** |
| 388 | * ccw_device_resume() - resume channel program execution |
| 389 | * @cdev: target ccw device |
| 390 | * |
| 391 | * ccw_device_resume() calls rsch on @cdev's subchannel. |
| 392 | * Returns: |
| 393 | * %0 on success, |
| 394 | * -%ENODEV on device not operational, |
| 395 | * -%EINVAL on invalid device state, |
| 396 | * -%EBUSY on device busy or interrupt pending. |
| 397 | * Context: |
| 398 | * Interrupts disabled, ccw device lock held |
| 399 | */ |
| 400 | int ccw_device_resume(struct ccw_device *cdev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 401 | { |
| 402 | struct subchannel *sch; |
| 403 | |
Sebastian Ott | e45efa9 | 2009-06-12 10:26:27 +0200 | [diff] [blame] | 404 | if (!cdev || !cdev->dev.parent) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 405 | return -ENODEV; |
| 406 | sch = to_subchannel(cdev->dev.parent); |
Sebastian Ott | 823d494 | 2009-06-16 10:30:20 +0200 | [diff] [blame] | 407 | if (!sch->schib.pmcw.ena) |
| 408 | return -EINVAL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 409 | if (cdev->private->state == DEV_STATE_NOT_OPER) |
| 410 | return -ENODEV; |
| 411 | if (cdev->private->state != DEV_STATE_ONLINE || |
Peter Oberparleiter | 23d805b6 | 2008-07-14 09:58:50 +0200 | [diff] [blame] | 412 | !(sch->schib.scsw.cmd.actl & SCSW_ACTL_SUSPENDED)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 413 | return -EINVAL; |
| 414 | return cio_resume(sch); |
| 415 | } |
| 416 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 417 | /** |
| 418 | * ccw_device_get_ciw() - Search for CIW command in extended sense data. |
| 419 | * @cdev: ccw device to inspect |
| 420 | * @ct: command type to look for |
| 421 | * |
| 422 | * During SenseID, command information words (CIWs) describing special |
| 423 | * commands available to the device may have been stored in the extended |
| 424 | * sense data. This function searches for CIWs of a specified command |
| 425 | * type in the extended sense data. |
| 426 | * Returns: |
| 427 | * %NULL if no extended sense data has been stored or if no CIW of the |
| 428 | * specified command type could be found, |
| 429 | * else a pointer to the CIW of the specified command type. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 430 | */ |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 431 | struct ciw *ccw_device_get_ciw(struct ccw_device *cdev, __u32 ct) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 432 | { |
| 433 | int ciw_cnt; |
| 434 | |
| 435 | if (cdev->private->flags.esid == 0) |
| 436 | return NULL; |
| 437 | for (ciw_cnt = 0; ciw_cnt < MAX_CIWS; ciw_cnt++) |
| 438 | if (cdev->private->senseid.ciw[ciw_cnt].ct == ct) |
| 439 | return cdev->private->senseid.ciw + ciw_cnt; |
| 440 | return NULL; |
| 441 | } |
| 442 | |
Cornelia Huck | b2ffd8e | 2007-10-12 16:11:17 +0200 | [diff] [blame] | 443 | /** |
| 444 | * ccw_device_get_path_mask() - get currently available paths |
| 445 | * @cdev: ccw device to be queried |
| 446 | * Returns: |
| 447 | * %0 if no subchannel for the device is available, |
| 448 | * else the mask of currently available paths for the ccw device's subchannel. |
| 449 | */ |
| 450 | __u8 ccw_device_get_path_mask(struct ccw_device *cdev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 451 | { |
| 452 | struct subchannel *sch; |
| 453 | |
Sebastian Ott | e45efa9 | 2009-06-12 10:26:27 +0200 | [diff] [blame] | 454 | if (!cdev->dev.parent) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 455 | return 0; |
Sebastian Ott | e45efa9 | 2009-06-12 10:26:27 +0200 | [diff] [blame] | 456 | |
| 457 | sch = to_subchannel(cdev->dev.parent); |
| 458 | return sch->lpm; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 459 | } |
| 460 | |
Sebastian Ott | 2bf29df | 2014-05-07 13:27:21 +0200 | [diff] [blame] | 461 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 462 | * ccw_device_get_chp_desc() - return newly allocated channel-path descriptor |
Sebastian Ott | 2bf29df | 2014-05-07 13:27:21 +0200 | [diff] [blame] | 463 | * @cdev: device to obtain the descriptor for |
| 464 | * @chp_idx: index of the channel path |
| 465 | * |
| 466 | * On success return a newly allocated copy of the channel-path description |
| 467 | * data associated with the given channel path. Return %NULL on error. |
| 468 | */ |
| 469 | struct channel_path_desc *ccw_device_get_chp_desc(struct ccw_device *cdev, |
| 470 | int chp_idx) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 471 | { |
| 472 | struct subchannel *sch; |
Peter Oberparleiter | e6b6e10 | 2007-04-27 16:01:28 +0200 | [diff] [blame] | 473 | struct chp_id chpid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 474 | |
| 475 | sch = to_subchannel(cdev->dev.parent); |
Peter Oberparleiter | e6b6e10 | 2007-04-27 16:01:28 +0200 | [diff] [blame] | 476 | chp_id_init(&chpid); |
Sebastian Ott | 2bf29df | 2014-05-07 13:27:21 +0200 | [diff] [blame] | 477 | chpid.id = sch->schib.pmcw.chpid[chp_idx]; |
Peter Oberparleiter | e6b6e10 | 2007-04-27 16:01:28 +0200 | [diff] [blame] | 478 | return chp_get_chp_desc(chpid); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 479 | } |
| 480 | |
Cornelia Huck | 9a92fe4 | 2007-05-10 15:45:42 +0200 | [diff] [blame] | 481 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 482 | * ccw_device_get_id() - obtain a ccw device id |
Cornelia Huck | 9a92fe4 | 2007-05-10 15:45:42 +0200 | [diff] [blame] | 483 | * @cdev: device to obtain the id for |
| 484 | * @dev_id: where to fill in the values |
| 485 | */ |
| 486 | void ccw_device_get_id(struct ccw_device *cdev, struct ccw_dev_id *dev_id) |
| 487 | { |
| 488 | *dev_id = cdev->private->dev_id; |
| 489 | } |
| 490 | EXPORT_SYMBOL(ccw_device_get_id); |
| 491 | |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 492 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 493 | * ccw_device_tm_start_key() - perform start function |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 494 | * @cdev: ccw device on which to perform the start function |
| 495 | * @tcw: transport-command word to be started |
| 496 | * @intparm: user defined parameter to be passed to the interrupt handler |
| 497 | * @lpm: mask of paths to use |
| 498 | * @key: storage key to use for storage access |
| 499 | * |
| 500 | * Start the tcw on the given ccw device. Return zero on success, non-zero |
| 501 | * otherwise. |
| 502 | */ |
| 503 | int ccw_device_tm_start_key(struct ccw_device *cdev, struct tcw *tcw, |
| 504 | unsigned long intparm, u8 lpm, u8 key) |
| 505 | { |
| 506 | struct subchannel *sch; |
| 507 | int rc; |
| 508 | |
| 509 | sch = to_subchannel(cdev->dev.parent); |
Sebastian Ott | 823d494 | 2009-06-16 10:30:20 +0200 | [diff] [blame] | 510 | if (!sch->schib.pmcw.ena) |
| 511 | return -EINVAL; |
Sebastian Ott | 50c8e31 | 2011-12-01 13:32:21 +0100 | [diff] [blame] | 512 | if (cdev->private->state == DEV_STATE_VERIFY) { |
| 513 | /* Remember to fake irb when finished. */ |
| 514 | if (!cdev->private->flags.fake_irb) { |
| 515 | cdev->private->flags.fake_irb = FAKE_TM_IRB; |
| 516 | cdev->private->intparm = intparm; |
| 517 | return 0; |
| 518 | } else |
| 519 | /* There's already a fake I/O around. */ |
| 520 | return -EBUSY; |
| 521 | } |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 522 | if (cdev->private->state != DEV_STATE_ONLINE) |
| 523 | return -EIO; |
Sebastian Ott | 659213b | 2011-12-01 13:32:20 +0100 | [diff] [blame] | 524 | /* Adjust requested path mask to exclude unusable paths. */ |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 525 | if (lpm) { |
Sebastian Ott | 659213b | 2011-12-01 13:32:20 +0100 | [diff] [blame] | 526 | lpm &= sch->lpm; |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 527 | if (lpm == 0) |
| 528 | return -EACCES; |
| 529 | } |
| 530 | rc = cio_tm_start_key(sch, tcw, lpm, key); |
| 531 | if (rc == 0) |
| 532 | cdev->private->intparm = intparm; |
| 533 | return rc; |
| 534 | } |
| 535 | EXPORT_SYMBOL(ccw_device_tm_start_key); |
| 536 | |
| 537 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 538 | * ccw_device_tm_start_timeout_key() - perform start function |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 539 | * @cdev: ccw device on which to perform the start function |
| 540 | * @tcw: transport-command word to be started |
| 541 | * @intparm: user defined parameter to be passed to the interrupt handler |
| 542 | * @lpm: mask of paths to use |
| 543 | * @key: storage key to use for storage access |
| 544 | * @expires: time span in jiffies after which to abort request |
| 545 | * |
| 546 | * Start the tcw on the given ccw device. Return zero on success, non-zero |
| 547 | * otherwise. |
| 548 | */ |
| 549 | int ccw_device_tm_start_timeout_key(struct ccw_device *cdev, struct tcw *tcw, |
| 550 | unsigned long intparm, u8 lpm, u8 key, |
| 551 | int expires) |
| 552 | { |
| 553 | int ret; |
| 554 | |
| 555 | ccw_device_set_timeout(cdev, expires); |
| 556 | ret = ccw_device_tm_start_key(cdev, tcw, intparm, lpm, key); |
| 557 | if (ret != 0) |
| 558 | ccw_device_set_timeout(cdev, 0); |
| 559 | return ret; |
| 560 | } |
| 561 | EXPORT_SYMBOL(ccw_device_tm_start_timeout_key); |
| 562 | |
| 563 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 564 | * ccw_device_tm_start() - perform start function |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 565 | * @cdev: ccw device on which to perform the start function |
| 566 | * @tcw: transport-command word to be started |
| 567 | * @intparm: user defined parameter to be passed to the interrupt handler |
| 568 | * @lpm: mask of paths to use |
| 569 | * |
| 570 | * Start the tcw on the given ccw device. Return zero on success, non-zero |
| 571 | * otherwise. |
| 572 | */ |
| 573 | int ccw_device_tm_start(struct ccw_device *cdev, struct tcw *tcw, |
| 574 | unsigned long intparm, u8 lpm) |
| 575 | { |
| 576 | return ccw_device_tm_start_key(cdev, tcw, intparm, lpm, |
| 577 | PAGE_DEFAULT_KEY); |
| 578 | } |
| 579 | EXPORT_SYMBOL(ccw_device_tm_start); |
| 580 | |
| 581 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 582 | * ccw_device_tm_start_timeout() - perform start function |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 583 | * @cdev: ccw device on which to perform the start function |
| 584 | * @tcw: transport-command word to be started |
| 585 | * @intparm: user defined parameter to be passed to the interrupt handler |
| 586 | * @lpm: mask of paths to use |
| 587 | * @expires: time span in jiffies after which to abort request |
| 588 | * |
| 589 | * Start the tcw on the given ccw device. Return zero on success, non-zero |
| 590 | * otherwise. |
| 591 | */ |
| 592 | int ccw_device_tm_start_timeout(struct ccw_device *cdev, struct tcw *tcw, |
| 593 | unsigned long intparm, u8 lpm, int expires) |
| 594 | { |
| 595 | return ccw_device_tm_start_timeout_key(cdev, tcw, intparm, lpm, |
| 596 | PAGE_DEFAULT_KEY, expires); |
| 597 | } |
| 598 | EXPORT_SYMBOL(ccw_device_tm_start_timeout); |
| 599 | |
| 600 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 601 | * ccw_device_get_mdc() - accumulate max data count |
Sebastian Ott | ce322cc | 2011-01-05 12:47:56 +0100 | [diff] [blame] | 602 | * @cdev: ccw device for which the max data count is accumulated |
| 603 | * @mask: mask of paths to use |
| 604 | * |
| 605 | * Return the number of 64K-bytes blocks all paths at least support |
| 606 | * for a transport command. Return values <= 0 indicate failures. |
| 607 | */ |
| 608 | int ccw_device_get_mdc(struct ccw_device *cdev, u8 mask) |
| 609 | { |
| 610 | struct subchannel *sch = to_subchannel(cdev->dev.parent); |
Peter Oberparleiter | 040495d | 2013-03-11 13:01:08 +0100 | [diff] [blame] | 611 | struct channel_path *chp; |
Sebastian Ott | ce322cc | 2011-01-05 12:47:56 +0100 | [diff] [blame] | 612 | struct chp_id chpid; |
Peter Oberparleiter | 040495d | 2013-03-11 13:01:08 +0100 | [diff] [blame] | 613 | int mdc = 0, i; |
Sebastian Ott | ce322cc | 2011-01-05 12:47:56 +0100 | [diff] [blame] | 614 | |
| 615 | /* Adjust requested path mask to excluded varied off paths. */ |
| 616 | if (mask) |
| 617 | mask &= sch->lpm; |
| 618 | else |
| 619 | mask = sch->lpm; |
| 620 | |
| 621 | chp_id_init(&chpid); |
| 622 | for (i = 0; i < 8; i++) { |
| 623 | if (!(mask & (0x80 >> i))) |
| 624 | continue; |
| 625 | chpid.id = sch->schib.pmcw.chpid[i]; |
Peter Oberparleiter | 040495d | 2013-03-11 13:01:08 +0100 | [diff] [blame] | 626 | chp = chpid_to_chp(chpid); |
| 627 | if (!chp) |
| 628 | continue; |
| 629 | |
| 630 | mutex_lock(&chp->lock); |
| 631 | if (!chp->desc_fmt1.f) { |
| 632 | mutex_unlock(&chp->lock); |
Sebastian Ott | ce322cc | 2011-01-05 12:47:56 +0100 | [diff] [blame] | 633 | return 0; |
Peter Oberparleiter | 040495d | 2013-03-11 13:01:08 +0100 | [diff] [blame] | 634 | } |
| 635 | if (!chp->desc_fmt1.r) |
Sebastian Ott | ce322cc | 2011-01-05 12:47:56 +0100 | [diff] [blame] | 636 | mdc = 1; |
Peter Oberparleiter | 040495d | 2013-03-11 13:01:08 +0100 | [diff] [blame] | 637 | mdc = mdc ? min_t(int, mdc, chp->desc_fmt1.mdc) : |
| 638 | chp->desc_fmt1.mdc; |
| 639 | mutex_unlock(&chp->lock); |
Sebastian Ott | ce322cc | 2011-01-05 12:47:56 +0100 | [diff] [blame] | 640 | } |
| 641 | |
| 642 | return mdc; |
| 643 | } |
| 644 | EXPORT_SYMBOL(ccw_device_get_mdc); |
| 645 | |
| 646 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 647 | * ccw_device_tm_intrg() - perform interrogate function |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 648 | * @cdev: ccw device on which to perform the interrogate function |
| 649 | * |
| 650 | * Perform an interrogate function on the given ccw device. Return zero on |
| 651 | * success, non-zero otherwise. |
| 652 | */ |
| 653 | int ccw_device_tm_intrg(struct ccw_device *cdev) |
| 654 | { |
| 655 | struct subchannel *sch = to_subchannel(cdev->dev.parent); |
| 656 | |
Sebastian Ott | 823d494 | 2009-06-16 10:30:20 +0200 | [diff] [blame] | 657 | if (!sch->schib.pmcw.ena) |
| 658 | return -EINVAL; |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 659 | if (cdev->private->state != DEV_STATE_ONLINE) |
| 660 | return -EIO; |
| 661 | if (!scsw_is_tm(&sch->schib.scsw) || |
Peter Oberparleiter | 7a968f0 | 2009-03-26 15:24:18 +0100 | [diff] [blame] | 662 | !(scsw_actl(&sch->schib.scsw) & SCSW_ACTL_START_PEND)) |
Peter Oberparleiter | 83262d6 | 2008-07-14 09:58:51 +0200 | [diff] [blame] | 663 | return -EINVAL; |
| 664 | return cio_tm_intrg(sch); |
| 665 | } |
| 666 | EXPORT_SYMBOL(ccw_device_tm_intrg); |
| 667 | |
Cornelia Huck | 9368dac | 2012-05-30 16:03:22 +0200 | [diff] [blame] | 668 | /** |
Sebastian Ott | 388b74d | 2016-06-23 11:09:26 +0200 | [diff] [blame] | 669 | * ccw_device_get_schid() - obtain a subchannel id |
Cornelia Huck | 9368dac | 2012-05-30 16:03:22 +0200 | [diff] [blame] | 670 | * @cdev: device to obtain the id for |
| 671 | * @schid: where to fill in the values |
| 672 | */ |
| 673 | void ccw_device_get_schid(struct ccw_device *cdev, struct subchannel_id *schid) |
| 674 | { |
| 675 | struct subchannel *sch = to_subchannel(cdev->dev.parent); |
| 676 | |
| 677 | *schid = sch->schid; |
| 678 | } |
| 679 | EXPORT_SYMBOL_GPL(ccw_device_get_schid); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 680 | |
Cornelia Huck | 4dd3cc5 | 2007-02-12 15:47:18 +0100 | [diff] [blame] | 681 | EXPORT_SYMBOL(ccw_device_set_options_mask); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 682 | EXPORT_SYMBOL(ccw_device_set_options); |
Cornelia Huck | 4dd3cc5 | 2007-02-12 15:47:18 +0100 | [diff] [blame] | 683 | EXPORT_SYMBOL(ccw_device_clear_options); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 684 | EXPORT_SYMBOL(ccw_device_clear); |
| 685 | EXPORT_SYMBOL(ccw_device_halt); |
| 686 | EXPORT_SYMBOL(ccw_device_resume); |
| 687 | EXPORT_SYMBOL(ccw_device_start_timeout); |
| 688 | EXPORT_SYMBOL(ccw_device_start); |
| 689 | EXPORT_SYMBOL(ccw_device_start_timeout_key); |
| 690 | EXPORT_SYMBOL(ccw_device_start_key); |
| 691 | EXPORT_SYMBOL(ccw_device_get_ciw); |
| 692 | EXPORT_SYMBOL(ccw_device_get_path_mask); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 693 | EXPORT_SYMBOL_GPL(ccw_device_get_chp_desc); |