Lines Matching +full:ctrl +full:- +full:module

2  * Emulated ccw-attached 3270 implementation
9 * your option) any later version. See the COPYING file in the top-level
15 #include "qemu/module.h"
17 #include "hw/s390x/css-bridge.h"
18 #include "hw/qdev-properties.h"
19 #include "hw/s390x/3270-ccw.h"
28 if (!ccw->cda) { in handle_payload_3270_read()
29 return -EFAULT; in handle_payload_3270_read()
32 len = ck->read_payload_3270(dev); in handle_payload_3270_read()
36 ccw_dev->sch->curr_status.scsw.count = ccw->count - len; in handle_payload_3270_read()
48 if (!ccw->cda) { in handle_payload_3270_write()
49 return -EFAULT; in handle_payload_3270_write()
52 len = ck->write_payload_3270(dev, ccw->cmd_code); in handle_payload_3270_write()
55 return len ? len : -EIO; in handle_payload_3270_write()
58 ccw_dev->sch->curr_status.scsw.count = ccw->count - len; in handle_payload_3270_write()
65 EmulatedCcw3270Device *dev = sch->driver_data; in emulated_ccw_3270_cb()
79 rc = -ENOSYS; in emulated_ccw_3270_cb()
83 if (rc == -EIO) { in emulated_ccw_3270_cb()
85 SCHIB *schib = &sch->curr_status; in emulated_ccw_3270_cb()
87 sch->curr_status.scsw.dstat = SCSW_DSTAT_UNIT_CHECK; in emulated_ccw_3270_cb()
88 sch->sense_data[0] = 0x40; /* intervention-req */ in emulated_ccw_3270_cb()
89 schib->scsw.ctrl &= ~SCSW_ACTL_START_PEND; in emulated_ccw_3270_cb()
90 schib->scsw.ctrl &= ~SCSW_CTRL_MASK_STCTL; in emulated_ccw_3270_cb()
91 schib->scsw.ctrl |= SCSW_STCTL_PRIMARY | SCSW_STCTL_SECONDARY | in emulated_ccw_3270_cb()
108 sch = css_create_sch(cdev->devno, errp); in emulated_ccw_3270_realize()
113 if (!ck->init) { in emulated_ccw_3270_realize()
117 sch->driver_data = dev; in emulated_ccw_3270_realize()
118 cdev->sch = sch; in emulated_ccw_3270_realize()
119 chpid = css_find_free_chpid(sch->cssid); in emulated_ccw_3270_realize()
126 sch->id.reserved = 0xff; in emulated_ccw_3270_realize()
127 sch->id.cu_type = EMULATED_CCW_3270_CU_TYPE; in emulated_ccw_3270_realize()
130 sch->do_subchannel_work = do_subchannel_work_virtual; in emulated_ccw_3270_realize()
131 sch->ccw_cb = emulated_ccw_3270_cb; in emulated_ccw_3270_realize()
132 sch->irb_cb = build_irb_virtual; in emulated_ccw_3270_realize()
134 ck->init(dev, &err); in emulated_ccw_3270_realize()
139 cdk->realize(cdev, &err); in emulated_ccw_3270_realize()
148 css_subch_assign(sch->cssid, sch->ssid, sch->schid, sch->devno, NULL); in emulated_ccw_3270_realize()
149 cdev->sch = NULL; in emulated_ccw_3270_realize()
157 dc->realize = emulated_ccw_3270_realize; in emulated_ccw_3270_class_init()
158 dc->hotpluggable = false; in emulated_ccw_3270_class_init()
159 set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); in emulated_ccw_3270_class_init()