Lines Matching +full:de +full:- +full:serialized
1 // SPDX-License-Identifier: GPL-2.0
3 * S/390 common I/O routines -- channel subsystem call
6 * Author(s): Ingo Adlung (adlung@de.ibm.com)
7 * Cornelia Huck (cornelia.huck@de.ibm.com)
8 * Arnd Bergmann (arndb@de.ibm.com)
57 * chsc_error_from_response() - convert a chsc response to an error
74 return -EINVAL; in chsc_error_from_response()
77 return -EOPNOTSUPP; in chsc_error_from_response()
80 return -EBUSY; in chsc_error_from_response()
83 return -ENOMEM; in chsc_error_from_response()
85 return -EUSERS; in chsc_error_from_response()
87 return -EIO; in chsc_error_from_response()
112 u8 chpid[8]; /* chpids 0-7 */
113 u16 fla[8]; /* full link addresses 0-7 */
128 ssd_area->request.length = 0x0010; in chsc_get_ssd_info()
129 ssd_area->request.code = 0x0004; in chsc_get_ssd_info()
130 ssd_area->ssid = schid.ssid; in chsc_get_ssd_info()
131 ssd_area->f_sch = schid.sch_no; in chsc_get_ssd_info()
132 ssd_area->l_sch = schid.sch_no; in chsc_get_ssd_info()
137 ret = (ccode == 3) ? -ENODEV : -EBUSY; in chsc_get_ssd_info()
140 ret = chsc_error_from_response(ssd_area->response.code); in chsc_get_ssd_info()
144 ssd_area->response.code); in chsc_get_ssd_info()
147 if (!ssd_area->sch_valid) { in chsc_get_ssd_info()
148 ret = -ENODEV; in chsc_get_ssd_info()
154 if ((ssd_area->st != SUBCHANNEL_TYPE_IO) && in chsc_get_ssd_info()
155 (ssd_area->st != SUBCHANNEL_TYPE_MSG)) in chsc_get_ssd_info()
157 ssd->path_mask = ssd_area->path_mask; in chsc_get_ssd_info()
158 ssd->fla_valid_mask = ssd_area->fla_valid_mask; in chsc_get_ssd_info()
161 if (ssd_area->path_mask & mask) { in chsc_get_ssd_info()
162 chp_id_init(&ssd->chpid[i]); in chsc_get_ssd_info()
163 ssd->chpid[i].id = ssd_area->chpid[i]; in chsc_get_ssd_info()
165 if (ssd_area->fla_valid_mask & mask) in chsc_get_ssd_info()
166 ssd->fla[i] = ssd_area->fla[i]; in chsc_get_ssd_info()
174 * chsc_ssqd() - store subchannel QDIO data (SSQD)
183 ssqd->request.length = 0x0010; in chsc_ssqd()
184 ssqd->request.code = 0x0024; in chsc_ssqd()
185 ssqd->first_sch = schid.sch_no; in chsc_ssqd()
186 ssqd->last_sch = schid.sch_no; in chsc_ssqd()
187 ssqd->ssid = schid.ssid; in chsc_ssqd()
190 return -EIO; in chsc_ssqd()
192 return chsc_error_from_response(ssqd->response.code); in chsc_ssqd()
197 * chsc_sadc() - set adapter device controls (SADC)
210 scssc->request.length = 0x0fe0; in chsc_sadc()
211 scssc->request.code = 0x0021; in chsc_sadc()
212 scssc->operation_code = 0; in chsc_sadc()
214 scssc->summary_indicator_addr = summary_indicator_addr; in chsc_sadc()
215 scssc->subchannel_indicator_addr = subchannel_indicator_addr; in chsc_sadc()
217 scssc->ks = PAGE_DEFAULT_KEY >> 4; in chsc_sadc()
218 scssc->kc = PAGE_DEFAULT_KEY >> 4; in chsc_sadc()
219 scssc->isc = isc; in chsc_sadc()
220 scssc->schid = schid; in chsc_sadc()
224 scssc->word_with_d_bit = 0x10000000; in chsc_sadc()
227 return -EIO; in chsc_sadc()
229 return chsc_error_from_response(scssc->response.code); in chsc_sadc()
235 spin_lock_irq(&sch->lock); in s390_subchannel_remove_chpid()
236 if (sch->driver && sch->driver->chp_event) in s390_subchannel_remove_chpid()
237 if (sch->driver->chp_event(sch, data, CHP_OFFLINE) != 0) in s390_subchannel_remove_chpid()
239 spin_unlock_irq(&sch->lock); in s390_subchannel_remove_chpid()
243 sch->lpm = 0; in s390_subchannel_remove_chpid()
244 spin_unlock_irq(&sch->lock); in s390_subchannel_remove_chpid()
245 css_schedule_eval(sch->schid); in s390_subchannel_remove_chpid()
265 mutex_lock(&chp->lock); in chsc_chp_offline()
267 mutex_unlock(&chp->lock); in chsc_chp_offline()
274 spin_lock_irq(&sch->lock); in __s390_process_res_acc()
275 if (sch->driver && sch->driver->chp_event) in __s390_process_res_acc()
276 sch->driver->chp_event(sch, data, CHP_ONLINE); in __s390_process_res_acc()
277 spin_unlock_irq(&sch->lock); in __s390_process_res_acc()
286 sprintf(dbf_txt, "accpr%x.%02x", link->chpid.cssid, in s390_process_res_acc()
287 link->chpid.id); in s390_process_res_acc()
289 if (link->fla != 0) { in s390_process_res_acc()
290 sprintf(dbf_txt, "fla%x", link->fla); in s390_process_res_acc()
308 spin_lock_irq(&sch->lock); in process_fces_event()
309 if (sch->driver && sch->driver->chp_event) in process_fces_event()
310 sch->driver->chp_event(sch, data, CHP_FCES_EVENT); in process_fces_event()
311 spin_unlock_irq(&sch->lock); in process_fces_event()
324 /* ccdf has to be big enough for a link-incident record */
325 u8 ccdf[PAGE_SIZE - 24 - 16]; /* content-code dependent field */
334 u8 ccdf[PAGE_SIZE - 24 - 56]; /* content-code dependent field */
350 u8 nt_area[PAGE_SIZE - 24];
355 * Link Incident Record as defined in SA22-7202, "ESCON I/O Interface"
395 if ((sei_area->vf & SEI_VF_FLA) != 0) { in chsc_link_from_sei()
396 link->fla = sei_area->fla; in chsc_link_from_sei()
397 link->fla_mask = ((sei_area->vf & SEI_VF_FLA) == SEI_VF_FLA) ? in chsc_link_from_sei()
408 if (nd->validity != ND_VALIDITY_VALID) { in format_node_data()
415 snprintf(params, PARAMS_LEN, "%02x,%06x", nd->byte0, nd->params); in format_node_data()
417 id = store_ebcdic(id, nd->type, sizeof(nd->type), '/'); in format_node_data()
418 id = store_ebcdic(id, nd->model, sizeof(nd->model), ','); in format_node_data()
419 id = store_ebcdic(id, nd->manufacturer, sizeof(nd->manufacturer), '.'); in format_node_data()
420 id = store_ebcdic(id, nd->plant, sizeof(nd->plant), 0); in format_node_data()
421 id = store_ebcdic(id, nd->seq, sizeof(nd->seq), ','); in format_node_data()
422 sprintf(id, "%04X", nd->tag); in format_node_data()
427 struct lir *lir = (struct lir *) &sei_area->ccdf; in chsc_process_sei_link_incident()
432 sei_area->rs, sei_area->rsid, sei_area->ccdf[0]); in chsc_process_sei_link_incident()
435 if (lir->iq.null) in chsc_process_sei_link_incident()
442 format_node_data(iuparams, iunodeid, &lir->incident_node); in chsc_process_sei_link_incident()
443 format_node_data(auparams, aunodeid, &lir->attached_node); in chsc_process_sei_link_incident()
445 switch (lir->iq.class) { in chsc_process_sei_link_incident()
449 sei_area->rs, sei_area->rsid, lir->ic, iuparams, in chsc_process_sei_link_incident()
455 sei_area->rs, sei_area->rsid, lir->ic, iuparams, in chsc_process_sei_link_incident()
471 "rs_id=%04x)\n", sei_area->rs, sei_area->rsid); in chsc_process_sei_res_acc()
472 if (sei_area->rs != 4) in chsc_process_sei_res_acc()
475 chpid.id = sei_area->rsid; in chsc_process_sei_res_acc()
485 mutex_lock(&chp->lock); in chsc_process_sei_res_acc()
487 mutex_unlock(&chp->lock); in chsc_process_sei_res_acc()
503 if (sei_area->rs != 0) in chsc_process_sei_chp_avail()
505 data = sei_area->ccdf; in chsc_process_sei_chp_avail()
519 mutex_lock(&chp->lock); in chsc_process_sei_chp_avail()
521 mutex_unlock(&chp->lock); in chsc_process_sei_chp_avail()
538 CIO_CRW_EVENT(4, "chsc: channel-path-configuration notification\n"); in chsc_process_sei_chp_config()
539 if (sei_area->rs != 0) in chsc_process_sei_chp_config()
541 data = (struct chp_config_data *) &(sei_area->ccdf); in chsc_process_sei_chp_config()
544 if (!chp_test_bit(data->map, num)) in chsc_process_sei_chp_config()
548 events[data->op], chpid.cssid, chpid.id); in chsc_process_sei_chp_config()
549 switch (data->op) { in chsc_process_sei_chp_config()
568 if (sei_area->rs != 7) in chsc_process_sei_scm_change()
582 if (sei_area->rs != 7) in chsc_process_sei_scm_avail()
594 if (sei_area->rs != 5) in chsc_process_sei_ap_cfg_chg()
608 "chsc: FCES status notification (rs=%02x, rs_id=%04x, FCES-status=%x)\n", in chsc_process_sei_fces_event()
609 sei_area->rs, sei_area->rsid, sei_area->ccdf[0]); in chsc_process_sei_fces_event()
611 if (sei_area->rs != SEI_RS_CHPID) in chsc_process_sei_fces_event()
614 chpid.id = sei_area->rsid; in chsc_process_sei_fces_event()
630 switch (sei_area->cc) { in chsc_process_sei_nt2()
632 zpci_event_error(sei_area->ccdf); in chsc_process_sei_nt2()
635 zpci_event_availability(sei_area->ccdf); in chsc_process_sei_nt2()
639 sei_area->cc); in chsc_process_sei_nt2()
647 switch (sei_area->cc) { in chsc_process_sei_nt0()
657 case 7: /* channel-path-availability information */ in chsc_process_sei_nt0()
660 case 8: /* channel-path-configuration notification */ in chsc_process_sei_nt0()
674 sei_area->cc); in chsc_process_sei_nt0()
679 if (sei_area->flags & 0x40) { in chsc_process_sei_nt0()
691 sei->request.length = 0x0010; in chsc_process_event_information()
692 sei->request.code = 0x000e; in chsc_process_event_information()
694 sei->ntsm = ntsm; in chsc_process_event_information()
699 if (sei->response.code != 0x0001) { in chsc_process_event_information()
701 sei->response.code, sei->ntsm); in chsc_process_event_information()
703 if (sei->response.code == 3 && sei->ntsm) { in chsc_process_event_information()
711 CIO_CRW_EVENT(2, "chsc: sei successful (nt=%d)\n", sei->nt); in chsc_process_event_information()
712 switch (sei->nt) { in chsc_process_event_information()
714 chsc_process_sei_nt0(&sei->u.nt0_area); in chsc_process_event_information()
717 chsc_process_sei_nt2(&sei->u.nt2_area); in chsc_process_event_information()
720 CIO_CRW_EVENT(2, "chsc: unhandled nt: %d\n", sei->nt); in chsc_process_event_information()
724 if (!(sei->u.nt0_area.flags & 0x80)) in chsc_process_event_information()
733 * Note: Access to sei_page is serialized through machine check handler
746 crw0->slct, crw0->oflw, crw0->chn, crw0->rsc, crw0->anc, in chsc_process_crw()
747 crw0->erc, crw0->rsid); in chsc_process_crw()
768 mutex_lock(&chp->lock); in chsc_chp_online()
770 mutex_unlock(&chp->lock); in chsc_chp_online()
786 spin_lock_irqsave(&sch->lock, flags); in __s390_subchannel_vary_chpid()
787 if (sch->driver && sch->driver->chp_event) in __s390_subchannel_vary_chpid()
788 sch->driver->chp_event(sch, &link, in __s390_subchannel_vary_chpid()
790 spin_unlock_irqrestore(&sch->lock, flags); in __s390_subchannel_vary_chpid()
810 * chsc_chp_vary - propagate channel-path vary operation to subchannels
811 * @chpid: channl-path ID
812 * @on: non-zero for vary online, zero for vary offline
840 if (!css->chps[i]) in chsc_remove_cmg_attr()
842 chp_remove_cmg_attr(css->chps[i]); in chsc_remove_cmg_attr()
853 if (!css->chps[i]) in chsc_add_cmg_attr()
855 ret = chp_add_cmg_attr(css->chps[i]); in chsc_add_cmg_attr()
861 while (i--) { in chsc_add_cmg_attr()
862 if (!css->chps[i]) in chsc_add_cmg_attr()
864 chp_remove_cmg_attr(css->chps[i]); in chsc_add_cmg_attr()
894 secm_area->request.length = 0x0050; in __chsc_do_secm()
895 secm_area->request.code = 0x0016; in __chsc_do_secm()
897 secm_area->key = PAGE_DEFAULT_KEY >> 4; in __chsc_do_secm()
898 secm_area->e = 1; in __chsc_do_secm()
901 secm_area->cub[i] = (__force dma64_t)virt_to_dma32(css->cub[i]); in __chsc_do_secm()
903 secm_area->ecub[i] = virt_to_dma64(css->ecub[i]); in __chsc_do_secm()
905 secm_area->operation_code = enable ? 0 : 1; in __chsc_do_secm()
909 ret = (ccode == 3) ? -ENODEV : -EBUSY; in __chsc_do_secm()
913 switch (secm_area->response.code) { in __chsc_do_secm()
916 ret = -EINVAL; in __chsc_do_secm()
919 ret = chsc_error_from_response(secm_area->response.code); in __chsc_do_secm()
923 secm_area->response.code); in __chsc_do_secm()
934 css->cub[i] = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); in cub_alloc()
935 if (!css->cub[i]) in cub_alloc()
936 return -ENOMEM; in cub_alloc()
939 css->ecub[i] = (void *)get_zeroed_page(GFP_KERNEL); in cub_alloc()
940 if (!css->ecub[i]) in cub_alloc()
941 return -ENOMEM; in cub_alloc()
952 free_page((unsigned long)css->cub[i]); in cub_free()
953 css->cub[i] = NULL; in cub_free()
956 free_page((unsigned long)css->ecub[i]); in cub_free()
957 css->ecub[i] = NULL; in cub_free()
966 if (enable && !css->cm_enabled) { in chsc_secm()
973 css->cm_enabled = enable; in chsc_secm()
974 if (css->cm_enabled) { in chsc_secm()
978 css->cm_enabled = 0; in chsc_secm()
985 if (!css->cm_enabled) in chsc_secm()
999 return -EINVAL; in chsc_determine_channel_path_desc()
1001 return -EINVAL; in chsc_determine_channel_path_desc()
1003 return -EINVAL; in chsc_determine_channel_path_desc()
1007 scpd_area->request.length = 0x0010; in chsc_determine_channel_path_desc()
1008 scpd_area->request.code = 0x0002; in chsc_determine_channel_path_desc()
1009 scpd_area->cssid = chpid.cssid; in chsc_determine_channel_path_desc()
1010 scpd_area->first_chpid = chpid.id; in chsc_determine_channel_path_desc()
1011 scpd_area->last_chpid = chpid.id; in chsc_determine_channel_path_desc()
1012 scpd_area->m = m; in chsc_determine_channel_path_desc()
1013 scpd_area->c = c; in chsc_determine_channel_path_desc()
1014 scpd_area->fmt = fmt; in chsc_determine_channel_path_desc()
1015 scpd_area->rfmt = rfmt; in chsc_determine_channel_path_desc()
1019 return (ccode == 3) ? -ENODEV : -EBUSY; in chsc_determine_channel_path_desc()
1021 ret = chsc_error_from_response(scpd_area->response.code); in chsc_determine_channel_path_desc()
1024 scpd_area->response.code); in chsc_determine_channel_path_desc()
1044 memcpy(desc, scpd_area->data, sizeof(*desc)); \
1063 chp->cmg_chars.values[i] = chars->values[i]; in chsc_initialize_cmg_chars()
1065 chp->cmg_chars.values[i] = 0; in chsc_initialize_cmg_chars()
1075 while (p--) in scmc_get_speed()
1110 chp->shared = -1; in chsc_get_channel_measurement_chars()
1111 chp->cmg = -1; in chsc_get_channel_measurement_chars()
1112 chp->extended = 0; in chsc_get_channel_measurement_chars()
1113 chp->speed = 0; in chsc_get_channel_measurement_chars()
1116 return -EINVAL; in chsc_get_channel_measurement_chars()
1121 scmc_area->request.length = 0x0010; in chsc_get_channel_measurement_chars()
1122 scmc_area->request.code = 0x0022; in chsc_get_channel_measurement_chars()
1123 scmc_area->first_chpid = chp->chpid.id; in chsc_get_channel_measurement_chars()
1124 scmc_area->last_chpid = chp->chpid.id; in chsc_get_channel_measurement_chars()
1128 ret = (ccode == 3) ? -ENODEV : -EBUSY; in chsc_get_channel_measurement_chars()
1132 ret = chsc_error_from_response(scmc_area->response.code); in chsc_get_channel_measurement_chars()
1135 scmc_area->response.code); in chsc_get_channel_measurement_chars()
1138 if (scmc_area->not_valid) in chsc_get_channel_measurement_chars()
1141 chp->cmg = scmc_area->cmg; in chsc_get_channel_measurement_chars()
1142 chp->shared = scmc_area->shared; in chsc_get_channel_measurement_chars()
1143 chp->extended = scmc_area->extended; in chsc_get_channel_measurement_chars()
1144 chp->speed = scmc_get_speed(scmc_area->cmgs, scmc_area->cmgp); in chsc_get_channel_measurement_chars()
1145 chsc_initialize_cmg_chars(chp, scmc_area->cmcv, in chsc_get_channel_measurement_chars()
1146 (struct cmg_chars *) &scmc_area->data); in chsc_get_channel_measurement_chars()
1159 ret = -ENOMEM; in chsc_init()
1183 sda_area->request.length = 0x0400; in __chsc_enable_facility()
1184 sda_area->request.code = 0x0031; in __chsc_enable_facility()
1185 sda_area->operation_code = operation_code; in __chsc_enable_facility()
1189 ret = (ret == 3) ? -ENODEV : -EBUSY; in __chsc_enable_facility()
1193 switch (sda_area->response.code) { in __chsc_enable_facility()
1195 ret = -EOPNOTSUPP; in __chsc_enable_facility()
1198 ret = chsc_error_from_response(sda_area->response.code); in __chsc_enable_facility()
1217 operation_code, sda_area->response.code); in chsc_enable_facility()
1243 sdcal_area->request.length = 0x0020; in chsc_get_cssid_iid()
1244 sdcal_area->request.code = 0x0034; in chsc_get_cssid_iid()
1245 sdcal_area->atype = 4; in chsc_get_cssid_iid()
1249 ret = (ret == 3) ? -ENODEV : -EBUSY; in chsc_get_cssid_iid()
1253 ret = chsc_error_from_response(sdcal_area->response.code); in chsc_get_cssid_iid()
1256 sdcal_area->response.code); in chsc_get_cssid_iid()
1260 if ((addr_t) &sdcal_area->list[idx] < in chsc_get_cssid_iid()
1261 (addr_t) &sdcal_area->response + sdcal_area->response.length) { in chsc_get_cssid_iid()
1262 *cssid = sdcal_area->list[idx].cssid; in chsc_get_cssid_iid()
1263 *iid = sdcal_area->list[idx].iid; in chsc_get_cssid_iid()
1266 ret = -ENODEV; in chsc_get_cssid_iid()
1294 scsc_area->request.length = 0x0010; in chsc_determine_css_characteristics()
1295 scsc_area->request.code = 0x0010; in chsc_determine_css_characteristics()
1299 result = (result == 3) ? -ENODEV : -EBUSY; in chsc_determine_css_characteristics()
1303 result = chsc_error_from_response(scsc_area->response.code); in chsc_determine_css_characteristics()
1305 memcpy(&css_general_characteristics, scsc_area->general_char, in chsc_determine_css_characteristics()
1307 memcpy(&css_chsc_characteristics, scsc_area->chsc_char, in chsc_determine_css_characteristics()
1311 scsc_area->response.code); in chsc_determine_css_characteristics()
1338 rr->request.length = 0x0020; in chsc_sstpc()
1339 rr->request.code = 0x0033; in chsc_sstpc()
1340 rr->op = op; in chsc_sstpc()
1341 rr->ctrl = ctrl; in chsc_sstpc()
1344 return -EIO; in chsc_sstpc()
1345 rc = (rr->response.code == 0x0001) ? 0 : -EIO; in chsc_sstpc()
1347 *clock_delta = rr->clock_delta; in chsc_sstpc()
1363 rr->request.length = 0x0010; in chsc_sstpi()
1364 rr->request.code = 0x0038; in chsc_sstpi()
1367 return -EIO; in chsc_sstpi()
1368 memcpy(result, &rr->data, size); in chsc_sstpi()
1369 return (rr->response.code == 0x0001) ? 0 : -EIO; in chsc_sstpi()
1384 rr->request.length = 0x0010; in chsc_stzi()
1385 rr->request.code = 0x003e; in chsc_stzi()
1388 return -EIO; in chsc_stzi()
1389 memcpy(result, &rr->data, size); in chsc_stzi()
1390 return (rr->response.code == 0x0001) ? 0 : -EIO; in chsc_stzi()
1410 siosl_area->request.length = 0x0010; in chsc_siosl()
1411 siosl_area->request.code = 0x0046; in chsc_siosl()
1412 siosl_area->word1 = 0x80000000; in chsc_siosl()
1413 siosl_area->sid = schid; in chsc_siosl()
1418 rc = -ENODEV; in chsc_siosl()
1420 rc = -EBUSY; in chsc_siosl()
1425 rc = chsc_error_from_response(siosl_area->response.code); in chsc_siosl()
1429 siosl_area->response.code); in chsc_siosl()
1440 * chsc_scm_info() - store SCM information (SSI)
1451 scm_area->request.length = 0x0020; in chsc_scm_info()
1452 scm_area->request.code = 0x004C; in chsc_scm_info()
1453 scm_area->reqtok = token; in chsc_scm_info()
1457 ret = (ccode == 3) ? -ENODEV : -EBUSY; in chsc_scm_info()
1460 ret = chsc_error_from_response(scm_area->response.code); in chsc_scm_info()
1463 scm_area->response.code); in chsc_scm_info()
1470 * chsc_pnso() - Perform Network-Subchannel Operation
1475 * @cnc: Boolean change-notification control
1485 pnso_area->request.length = 0x0030; in chsc_pnso()
1486 pnso_area->request.code = 0x003d; /* network-subchannel operation */ in chsc_pnso()
1487 pnso_area->m = schid.m; in chsc_pnso()
1488 pnso_area->ssid = schid.ssid; in chsc_pnso()
1489 pnso_area->sch = schid.sch_no; in chsc_pnso()
1490 pnso_area->cssid = schid.cssid; in chsc_pnso()
1491 pnso_area->oc = oc; in chsc_pnso()
1492 pnso_area->resume_token = resume_token; in chsc_pnso()
1493 pnso_area->n = (cnc != 0); in chsc_pnso()
1495 return -EIO; in chsc_pnso()
1496 return chsc_error_from_response(pnso_area->response.code); in chsc_pnso()
1522 sgib_area->request.length = 0x0fe0; in chsc_sgib()
1523 sgib_area->request.code = 0x0021; in chsc_sgib()
1524 sgib_area->op = 0x1; in chsc_sgib()
1525 sgib_area->gib_origin = origin; in chsc_sgib()
1529 ret = chsc_error_from_response(sgib_area->response.code); in chsc_sgib()
1569 * chsc_scud() - Store control-unit description.
1570 * @cu: number of the control-unit
1571 * @esm: 8 1-byte endpoint security mode values
1586 scud->request.length = SCUD_REQ_LEN; in chsc_scud()
1587 scud->request.code = SCUD_REQ_CMD; in chsc_scud()
1588 scud->fmt = 0; in chsc_scud()
1589 scud->cssid = 0; in chsc_scud()
1590 scud->first_cu = cu; in chsc_scud()
1591 scud->last_cu = cu; in chsc_scud()
1595 ret = chsc_error_from_response(scud->response.code); in chsc_scud()
1597 if (!ret && (scud->response.length <= 8 || scud->fmt_resp != 0 in chsc_scud()
1598 || !(scud->cudb[0].flags & 0x80) in chsc_scud()
1599 || scud->cudb[0].cu != cu)) { in chsc_scud()
1603 scud->response.code, scud->response.length, in chsc_scud()
1604 scud->fmt_resp, scud->cudb[0].flags, scud->cudb[0].cu); in chsc_scud()
1605 ret = -EINVAL; in chsc_scud()
1611 memcpy(esm, scud->cudb[0].esm, sizeof(*esm)); in chsc_scud()
1612 *esm_valid = scud->cudb[0].esm_valid; in chsc_scud()