Lines Matching full:private

18 static int fsm_io_helper(struct vfio_ccw_private *private)  in fsm_io_helper()  argument
27 sch = private->sch; in fsm_io_helper()
31 orb = cp_get_orb(&private->cp, (u32)(addr_t)sch, sch->lpm); in fsm_io_helper()
52 private->state = VFIO_CCW_STATE_CP_PENDING; in fsm_io_helper()
80 static int fsm_do_halt(struct vfio_ccw_private *private) in fsm_do_halt() argument
87 sch = private->sch; in fsm_do_halt()
121 static int fsm_do_clear(struct vfio_ccw_private *private) in fsm_do_clear() argument
128 sch = private->sch; in fsm_do_clear()
159 static void fsm_notoper(struct vfio_ccw_private *private, in fsm_notoper() argument
162 struct subchannel *sch = private->sch; in fsm_notoper()
172 private->state = VFIO_CCW_STATE_NOT_OPER; in fsm_notoper()
178 static void fsm_nop(struct vfio_ccw_private *private, in fsm_nop() argument
183 static void fsm_io_error(struct vfio_ccw_private *private, in fsm_io_error() argument
186 pr_err("vfio-ccw: FSM: I/O request from state:%d\n", private->state); in fsm_io_error()
187 private->io_region->ret_code = -EIO; in fsm_io_error()
190 static void fsm_io_busy(struct vfio_ccw_private *private, in fsm_io_busy() argument
193 private->io_region->ret_code = -EBUSY; in fsm_io_busy()
196 static void fsm_io_retry(struct vfio_ccw_private *private, in fsm_io_retry() argument
199 private->io_region->ret_code = -EAGAIN; in fsm_io_retry()
202 static void fsm_async_error(struct vfio_ccw_private *private, in fsm_async_error() argument
205 struct ccw_cmd_region *cmd_region = private->cmd_region; in fsm_async_error()
210 "<unknown>", private->state); in fsm_async_error()
214 static void fsm_async_retry(struct vfio_ccw_private *private, in fsm_async_retry() argument
217 private->cmd_region->ret_code = -EAGAIN; in fsm_async_retry()
220 static void fsm_disabled_irq(struct vfio_ccw_private *private, in fsm_disabled_irq() argument
223 struct subchannel *sch = private->sch; in fsm_disabled_irq()
239 static void fsm_io_request(struct vfio_ccw_private *private, in fsm_io_request() argument
243 union scsw *scsw = &private->scsw; in fsm_io_request()
244 struct ccw_io_region *io_region = private->io_region; in fsm_io_request()
245 struct mdev_device *mdev = private->mdev; in fsm_io_request()
247 struct subchannel_id schid = get_schid(private); in fsm_io_request()
249 private->state = VFIO_CCW_STATE_CP_PROCESSING; in fsm_io_request()
265 io_region->ret_code = cp_init(&private->cp, mdev_dev(mdev), in fsm_io_request()
277 io_region->ret_code = cp_prefetch(&private->cp); in fsm_io_request()
285 cp_free(&private->cp); in fsm_io_request()
290 io_region->ret_code = fsm_io_helper(private); in fsm_io_request()
298 cp_free(&private->cp); in fsm_io_request()
328 static void fsm_async_request(struct vfio_ccw_private *private, in fsm_async_request() argument
331 struct ccw_cmd_region *cmd_region = private->cmd_region; in fsm_async_request()
335 cmd_region->ret_code = fsm_do_halt(private); in fsm_async_request()
338 cmd_region->ret_code = fsm_do_clear(private); in fsm_async_request()
345 trace_vfio_ccw_fsm_async_request(get_schid(private), in fsm_async_request()
353 static void fsm_irq(struct vfio_ccw_private *private, in fsm_irq() argument
359 VFIO_CCW_TRACE_EVENT(6, dev_name(&private->sch->dev)); in fsm_irq()
361 memcpy(&private->irb, irb, sizeof(*irb)); in fsm_irq()
363 queue_work(vfio_ccw_work_q, &private->io_work); in fsm_irq()
365 if (private->completion) in fsm_irq()
366 complete(private->completion); in fsm_irq()