Lines Matching refs:sch
21 struct subchannel *sch = to_subchannel(private->vdev.dev->parent); in fsm_io_helper() local
28 spin_lock_irqsave(&sch->lock, flags); in fsm_io_helper()
30 orb = cp_get_orb(&private->cp, sch); in fsm_io_helper()
37 VFIO_CCW_TRACE_EVENT(5, dev_name(&sch->dev)); in fsm_io_helper()
40 ccode = ssch(sch->schid, orb); in fsm_io_helper()
49 sch->schib.scsw.cmd.actl |= SCSW_ACTL_START_PEND; in fsm_io_helper()
61 sch->lpm &= ~lpm; in fsm_io_helper()
63 sch->lpm = 0; in fsm_io_helper()
65 if (cio_update_schib(sch)) in fsm_io_helper()
68 ret = sch->lpm ? -EACCES : -ENODEV; in fsm_io_helper()
75 spin_unlock_irqrestore(&sch->lock, flags); in fsm_io_helper()
81 struct subchannel *sch = to_subchannel(private->vdev.dev->parent); in fsm_do_halt() local
86 spin_lock_irqsave(&sch->lock, flags); in fsm_do_halt()
89 VFIO_CCW_TRACE_EVENT(2, dev_name(&sch->dev)); in fsm_do_halt()
92 ccode = hsch(sch->schid); in fsm_do_halt()
101 sch->schib.scsw.cmd.actl |= SCSW_ACTL_HALT_PEND; in fsm_do_halt()
114 spin_unlock_irqrestore(&sch->lock, flags); in fsm_do_halt()
120 struct subchannel *sch = to_subchannel(private->vdev.dev->parent); in fsm_do_clear() local
125 spin_lock_irqsave(&sch->lock, flags); in fsm_do_clear()
128 VFIO_CCW_TRACE_EVENT(2, dev_name(&sch->dev)); in fsm_do_clear()
131 ccode = csch(sch->schid); in fsm_do_clear()
140 sch->schib.scsw.cmd.actl = SCSW_ACTL_CLEAR_PEND; in fsm_do_clear()
150 spin_unlock_irqrestore(&sch->lock, flags); in fsm_do_clear()
157 struct subchannel *sch = to_subchannel(private->vdev.dev->parent); in fsm_notoper() local
160 sch->schid.cssid, in fsm_notoper()
161 sch->schid.ssid, in fsm_notoper()
162 sch->schid.sch_no, in fsm_notoper()
170 css_sched_sch_todo(sch, SCH_TODO_UNREG); in fsm_notoper()
225 struct subchannel *sch = to_subchannel(private->vdev.dev->parent); in fsm_disabled_irq() local
231 cio_disable_subchannel(sch); in fsm_disabled_irq()
235 struct subchannel *sch = to_subchannel(p->vdev.dev->parent); in get_schid() local
237 return sch->schid; in get_schid()
359 struct subchannel *sch = to_subchannel(private->vdev.dev->parent); in fsm_irq() local
363 VFIO_CCW_TRACE_EVENT(6, dev_name(&sch->dev)); in fsm_irq()
376 struct subchannel *sch = to_subchannel(private->vdev.dev->parent); in fsm_open() local
379 spin_lock_irq(&sch->lock); in fsm_open()
380 sch->isc = VFIO_CCW_ISC; in fsm_open()
381 ret = cio_enable_subchannel(sch, (u32)virt_to_phys(sch)); in fsm_open()
386 spin_unlock_irq(&sch->lock); in fsm_open()
390 spin_unlock_irq(&sch->lock); in fsm_open()
397 struct subchannel *sch = to_subchannel(private->vdev.dev->parent); in fsm_close() local
400 spin_lock_irq(&sch->lock); in fsm_close()
402 if (!sch->schib.pmcw.ena) in fsm_close()
405 ret = cio_disable_subchannel(sch); in fsm_close()
407 ret = vfio_ccw_sch_quiesce(sch); in fsm_close()
412 spin_unlock_irq(&sch->lock); in fsm_close()
417 spin_unlock_irq(&sch->lock); in fsm_close()