Lines Matching refs:private

19 static int fsm_io_helper(struct vfio_ccw_private *private)
21 struct subchannel *sch = to_subchannel(private->vdev.dev->parent);
30 orb = cp_get_orb(&private->cp, sch);
51 private->state = VFIO_CCW_STATE_CP_PENDING;
79 static int fsm_do_halt(struct vfio_ccw_private *private)
81 struct subchannel *sch = to_subchannel(private->vdev.dev->parent);
118 static int fsm_do_clear(struct vfio_ccw_private *private)
120 struct subchannel *sch = to_subchannel(private->vdev.dev->parent);
154 static void fsm_notoper(struct vfio_ccw_private *private,
157 struct subchannel *sch = to_subchannel(private->vdev.dev->parent);
164 private->state);
171 private->state = VFIO_CCW_STATE_NOT_OPER;
174 cp_free(&private->cp);
180 static void fsm_nop(struct vfio_ccw_private *private,
185 static void fsm_io_error(struct vfio_ccw_private *private,
188 pr_err("vfio-ccw: FSM: I/O request from state:%d\n", private->state);
189 private->io_region->ret_code = -EIO;
192 static void fsm_io_busy(struct vfio_ccw_private *private,
195 private->io_region->ret_code = -EBUSY;
198 static void fsm_io_retry(struct vfio_ccw_private *private,
201 private->io_region->ret_code = -EAGAIN;
204 static void fsm_async_error(struct vfio_ccw_private *private,
207 struct ccw_cmd_region *cmd_region = private->cmd_region;
212 "<unknown>", private->state);
216 static void fsm_async_retry(struct vfio_ccw_private *private,
219 private->cmd_region->ret_code = -EAGAIN;
222 static void fsm_disabled_irq(struct vfio_ccw_private *private,
225 struct subchannel *sch = to_subchannel(private->vdev.dev->parent);
243 static void fsm_io_request(struct vfio_ccw_private *private,
247 union scsw *scsw = &private->scsw;
248 struct ccw_io_region *io_region = private->io_region;
250 struct subchannel_id schid = get_schid(private);
252 private->state = VFIO_CCW_STATE_CP_PROCESSING;
268 io_region->ret_code = cp_init(&private->cp, orb);
279 io_region->ret_code = cp_prefetch(&private->cp);
287 cp_free(&private->cp);
292 io_region->ret_code = fsm_io_helper(private);
300 cp_free(&private->cp);
323 private->state = VFIO_CCW_STATE_IDLE;
331 static void fsm_async_request(struct vfio_ccw_private *private,
334 struct ccw_cmd_region *cmd_region = private->cmd_region;
338 cmd_region->ret_code = fsm_do_halt(private);
341 cmd_region->ret_code = fsm_do_clear(private);
348 trace_vfio_ccw_fsm_async_request(get_schid(private),
356 static void fsm_irq(struct vfio_ccw_private *private,
359 struct subchannel *sch = to_subchannel(private->vdev.dev->parent);
365 memcpy(&private->irb, irb, sizeof(*irb));
367 queue_work(vfio_ccw_work_q, &private->io_work);
369 if (private->completion)
370 complete(private->completion);
373 static void fsm_open(struct vfio_ccw_private *private,
376 struct subchannel *sch = to_subchannel(private->vdev.dev->parent);
385 private->state = VFIO_CCW_STATE_IDLE;
391 vfio_ccw_fsm_event(private, VFIO_CCW_EVENT_NOT_OPER);
394 static void fsm_close(struct vfio_ccw_private *private,
397 struct subchannel *sch = to_subchannel(private->vdev.dev->parent);
411 private->state = VFIO_CCW_STATE_STANDBY;
413 cp_free(&private->cp);
418 vfio_ccw_fsm_event(private, VFIO_CCW_EVENT_NOT_OPER);