Lines Matching refs:cdev
39 int ccw_device_set_options_mask(struct ccw_device *cdev, unsigned long flags) in ccw_device_set_options_mask() argument
47 cdev->private->options.fast = (flags & CCWDEV_EARLY_NOTIFICATION) != 0; in ccw_device_set_options_mask()
48 cdev->private->options.repall = (flags & CCWDEV_REPORT_ALL) != 0; in ccw_device_set_options_mask()
49 cdev->private->options.pgroup = (flags & CCWDEV_DO_PATHGROUP) != 0; in ccw_device_set_options_mask()
50 cdev->private->options.force = (flags & CCWDEV_ALLOW_FORCE) != 0; in ccw_device_set_options_mask()
51 cdev->private->options.mpath = (flags & CCWDEV_DO_MULTIPATH) != 0; in ccw_device_set_options_mask()
64 int ccw_device_set_options(struct ccw_device *cdev, unsigned long flags) in ccw_device_set_options() argument
72 cdev->private->options.repall) || in ccw_device_set_options()
74 cdev->private->options.fast)) in ccw_device_set_options()
76 cdev->private->options.fast |= (flags & CCWDEV_EARLY_NOTIFICATION) != 0; in ccw_device_set_options()
77 cdev->private->options.repall |= (flags & CCWDEV_REPORT_ALL) != 0; in ccw_device_set_options()
78 cdev->private->options.pgroup |= (flags & CCWDEV_DO_PATHGROUP) != 0; in ccw_device_set_options()
79 cdev->private->options.force |= (flags & CCWDEV_ALLOW_FORCE) != 0; in ccw_device_set_options()
80 cdev->private->options.mpath |= (flags & CCWDEV_DO_MULTIPATH) != 0; in ccw_device_set_options()
91 void ccw_device_clear_options(struct ccw_device *cdev, unsigned long flags) in ccw_device_clear_options() argument
93 cdev->private->options.fast &= (flags & CCWDEV_EARLY_NOTIFICATION) == 0; in ccw_device_clear_options()
94 cdev->private->options.repall &= (flags & CCWDEV_REPORT_ALL) == 0; in ccw_device_clear_options()
95 cdev->private->options.pgroup &= (flags & CCWDEV_DO_PATHGROUP) == 0; in ccw_device_clear_options()
96 cdev->private->options.force &= (flags & CCWDEV_ALLOW_FORCE) == 0; in ccw_device_clear_options()
97 cdev->private->options.mpath &= (flags & CCWDEV_DO_MULTIPATH) == 0; in ccw_device_clear_options()
106 int ccw_device_is_pathgroup(struct ccw_device *cdev) in ccw_device_is_pathgroup() argument
108 return cdev->private->flags.pgroup; in ccw_device_is_pathgroup()
118 int ccw_device_is_multipath(struct ccw_device *cdev) in ccw_device_is_multipath() argument
120 return cdev->private->flags.mpath; in ccw_device_is_multipath()
137 int ccw_device_clear(struct ccw_device *cdev, unsigned long intparm) in ccw_device_clear() argument
142 if (!cdev || !cdev->dev.parent) in ccw_device_clear()
144 sch = to_subchannel(cdev->dev.parent); in ccw_device_clear()
147 if (cdev->private->state == DEV_STATE_NOT_OPER) in ccw_device_clear()
149 if (cdev->private->state != DEV_STATE_ONLINE && in ccw_device_clear()
150 cdev->private->state != DEV_STATE_W4SENSE) in ccw_device_clear()
155 cdev->private->intparm = intparm; in ccw_device_clear()
191 int ccw_device_start_timeout_key(struct ccw_device *cdev, struct ccw1 *cpa, in ccw_device_start_timeout_key() argument
198 if (!cdev || !cdev->dev.parent) in ccw_device_start_timeout_key()
200 sch = to_subchannel(cdev->dev.parent); in ccw_device_start_timeout_key()
203 if (cdev->private->state == DEV_STATE_NOT_OPER) in ccw_device_start_timeout_key()
205 if (cdev->private->state == DEV_STATE_VERIFY || in ccw_device_start_timeout_key()
206 cdev->private->flags.doverify) { in ccw_device_start_timeout_key()
208 if (!cdev->private->flags.fake_irb) { in ccw_device_start_timeout_key()
209 cdev->private->flags.fake_irb = FAKE_CMD_IRB; in ccw_device_start_timeout_key()
210 cdev->private->intparm = intparm; in ccw_device_start_timeout_key()
216 if (cdev->private->state != DEV_STATE_ONLINE || in ccw_device_start_timeout_key()
232 cdev->private->intparm = intparm; in ccw_device_start_timeout_key()
234 ccw_device_set_timeout(cdev, expires); in ccw_device_start_timeout_key()
238 dev_fsm_event(cdev, DEV_EVENT_VERIFY); in ccw_device_start_timeout_key()
271 int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa, in ccw_device_start_key() argument
275 return ccw_device_start_timeout_key(cdev, cpa, intparm, lpm, key, in ccw_device_start_key()
305 int ccw_device_start(struct ccw_device *cdev, struct ccw1 *cpa, in ccw_device_start() argument
308 return ccw_device_start_key(cdev, cpa, intparm, lpm, in ccw_device_start()
343 int ccw_device_start_timeout(struct ccw_device *cdev, struct ccw1 *cpa, in ccw_device_start_timeout() argument
347 return ccw_device_start_timeout_key(cdev, cpa, intparm, lpm, in ccw_device_start_timeout()
370 int ccw_device_halt(struct ccw_device *cdev, unsigned long intparm) in ccw_device_halt() argument
375 if (!cdev || !cdev->dev.parent) in ccw_device_halt()
377 sch = to_subchannel(cdev->dev.parent); in ccw_device_halt()
380 if (cdev->private->state == DEV_STATE_NOT_OPER) in ccw_device_halt()
382 if (cdev->private->state != DEV_STATE_ONLINE && in ccw_device_halt()
383 cdev->private->state != DEV_STATE_W4SENSE) in ccw_device_halt()
388 cdev->private->intparm = intparm; in ccw_device_halt()
405 int ccw_device_resume(struct ccw_device *cdev) in ccw_device_resume() argument
409 if (!cdev || !cdev->dev.parent) in ccw_device_resume()
411 sch = to_subchannel(cdev->dev.parent); in ccw_device_resume()
414 if (cdev->private->state == DEV_STATE_NOT_OPER) in ccw_device_resume()
416 if (cdev->private->state != DEV_STATE_ONLINE || in ccw_device_resume()
436 struct ciw *ccw_device_get_ciw(struct ccw_device *cdev, __u32 ct) in ccw_device_get_ciw() argument
440 if (cdev->private->flags.esid == 0) in ccw_device_get_ciw()
443 if (cdev->private->dma_area->senseid.ciw[ciw_cnt].ct == ct) in ccw_device_get_ciw()
444 return cdev->private->dma_area->senseid.ciw + ciw_cnt; in ccw_device_get_ciw()
455 __u8 ccw_device_get_path_mask(struct ccw_device *cdev) in ccw_device_get_path_mask() argument
459 if (!cdev->dev.parent) in ccw_device_get_path_mask()
462 sch = to_subchannel(cdev->dev.parent); in ccw_device_get_path_mask()
474 struct channel_path_desc_fmt0 *ccw_device_get_chp_desc(struct ccw_device *cdev, in ccw_device_get_chp_desc() argument
480 sch = to_subchannel(cdev->dev.parent); in ccw_device_get_chp_desc()
494 u8 *ccw_device_get_util_str(struct ccw_device *cdev, int chp_idx) in ccw_device_get_util_str() argument
496 struct subchannel *sch = to_subchannel(cdev->dev.parent); in ccw_device_get_util_str()
521 void ccw_device_get_id(struct ccw_device *cdev, struct ccw_dev_id *dev_id) in ccw_device_get_id() argument
523 *dev_id = cdev->private->dev_id; in ccw_device_get_id()
539 int ccw_device_tm_start_timeout_key(struct ccw_device *cdev, struct tcw *tcw, in ccw_device_tm_start_timeout_key() argument
546 sch = to_subchannel(cdev->dev.parent); in ccw_device_tm_start_timeout_key()
549 if (cdev->private->state == DEV_STATE_VERIFY) { in ccw_device_tm_start_timeout_key()
551 if (!cdev->private->flags.fake_irb) { in ccw_device_tm_start_timeout_key()
552 cdev->private->flags.fake_irb = FAKE_TM_IRB; in ccw_device_tm_start_timeout_key()
553 cdev->private->intparm = intparm; in ccw_device_tm_start_timeout_key()
559 if (cdev->private->state != DEV_STATE_ONLINE) in ccw_device_tm_start_timeout_key()
569 cdev->private->intparm = intparm; in ccw_device_tm_start_timeout_key()
571 ccw_device_set_timeout(cdev, expires); in ccw_device_tm_start_timeout_key()
588 int ccw_device_tm_start_key(struct ccw_device *cdev, struct tcw *tcw, in ccw_device_tm_start_key() argument
591 return ccw_device_tm_start_timeout_key(cdev, tcw, intparm, lpm, key, 0); in ccw_device_tm_start_key()
605 int ccw_device_tm_start(struct ccw_device *cdev, struct tcw *tcw, in ccw_device_tm_start() argument
608 return ccw_device_tm_start_key(cdev, tcw, intparm, lpm, in ccw_device_tm_start()
624 int ccw_device_tm_start_timeout(struct ccw_device *cdev, struct tcw *tcw, in ccw_device_tm_start_timeout() argument
627 return ccw_device_tm_start_timeout_key(cdev, tcw, intparm, lpm, in ccw_device_tm_start_timeout()
640 int ccw_device_get_mdc(struct ccw_device *cdev, u8 mask) in ccw_device_get_mdc() argument
642 struct subchannel *sch = to_subchannel(cdev->dev.parent); in ccw_device_get_mdc()
685 int ccw_device_tm_intrg(struct ccw_device *cdev) in ccw_device_tm_intrg() argument
687 struct subchannel *sch = to_subchannel(cdev->dev.parent); in ccw_device_tm_intrg()
691 if (cdev->private->state != DEV_STATE_ONLINE) in ccw_device_tm_intrg()
705 void ccw_device_get_schid(struct ccw_device *cdev, struct subchannel_id *schid) in ccw_device_get_schid() argument
707 struct subchannel *sch = to_subchannel(cdev->dev.parent); in ccw_device_get_schid()
725 int ccw_device_pnso(struct ccw_device *cdev, in ccw_device_pnso() argument
731 ccw_device_get_schid(cdev, &schid); in ccw_device_pnso()
741 int ccw_device_get_cssid(struct ccw_device *cdev, u8 *cssid) in ccw_device_get_cssid() argument
743 struct device *sch_dev = cdev->dev.parent; in ccw_device_get_cssid()
757 int ccw_device_get_iid(struct ccw_device *cdev, u8 *iid) in ccw_device_get_iid() argument
759 struct device *sch_dev = cdev->dev.parent; in ccw_device_get_iid()
774 int ccw_device_get_chpid(struct ccw_device *cdev, int chp_idx, u8 *chpid) in ccw_device_get_chpid() argument
776 struct subchannel *sch = to_subchannel(cdev->dev.parent); in ccw_device_get_chpid()
796 int ccw_device_get_chid(struct ccw_device *cdev, int chp_idx, u16 *chid) in ccw_device_get_chid() argument
803 rc = ccw_device_get_chpid(cdev, chp_idx, &cssid_chpid.id); in ccw_device_get_chid()
826 void *ccw_device_dma_zalloc(struct ccw_device *cdev, size_t size) in ccw_device_dma_zalloc() argument
830 if (!get_device(&cdev->dev)) in ccw_device_dma_zalloc()
832 addr = cio_gp_dma_zalloc(cdev->private->dma_pool, &cdev->dev, size); in ccw_device_dma_zalloc()
834 put_device(&cdev->dev); in ccw_device_dma_zalloc()
839 void ccw_device_dma_free(struct ccw_device *cdev, void *cpu_addr, size_t size) in ccw_device_dma_free() argument
843 cio_gp_dma_free(cdev->private->dma_pool, cpu_addr, size); in ccw_device_dma_free()
844 put_device(&cdev->dev); in ccw_device_dma_free()