Lines Matching full:cdm
76 ccb.cdm.num_matches = 0; in fetch_path_id()
77 ccb.cdm.match_buf_len = bufsize; in fetch_path_id()
78 ccb.cdm.matches = calloc(1, bufsize); in fetch_path_id()
81 ccb.cdm.num_patterns = 1; in fetch_path_id()
82 ccb.cdm.pattern_buf_len = bufsize; in fetch_path_id()
83 ccb.cdm.patterns = calloc(1, bufsize); in fetch_path_id()
86 ccb.cdm.patterns[0].type = DEV_MATCH_BUS; in fetch_path_id()
87 b = &ccb.cdm.patterns[0].pattern.bus_pattern; in fetch_path_id()
95 free(ccb.cdm.matches); in fetch_path_id()
96 free(ccb.cdm.patterns); in fetch_path_id()
99 free(ccb.cdm.patterns); in fetch_path_id()
102 (ccb.cdm.status != CAM_DEV_MATCH_LAST)) { in fetch_path_id()
103 warnx("fetch_path_id got CAM error %#x, CDM error %d\n", in fetch_path_id()
104 ccb.ccb_h.status, ccb.cdm.status); in fetch_path_id()
105 free(ccb.cdm.matches); in fetch_path_id()
110 if (ccb.cdm.num_matches != 1 || in fetch_path_id()
111 ccb.cdm.matches[0].type != DEV_MATCH_BUS) { in fetch_path_id()
112 free(ccb.cdm.matches); in fetch_path_id()
115 *path_id = ccb.cdm.matches[0].result.bus_result.path_id; in fetch_path_id()
116 free(ccb.cdm.matches); in fetch_path_id()
150 ccb.cdm.num_matches = 0; in mpt_query_disk()
151 ccb.cdm.match_buf_len = bufsize; in mpt_query_disk()
152 ccb.cdm.matches = calloc(1, bufsize); in mpt_query_disk()
155 ccb.cdm.num_patterns = 1; in mpt_query_disk()
156 ccb.cdm.pattern_buf_len = bufsize; in mpt_query_disk()
157 ccb.cdm.patterns = calloc(1, bufsize); in mpt_query_disk()
160 ccb.cdm.patterns[0].type = DEV_MATCH_PERIPH; in mpt_query_disk()
161 p = &ccb.cdm.patterns[0].pattern.periph_pattern; in mpt_query_disk()
169 free(ccb.cdm.matches); in mpt_query_disk()
170 free(ccb.cdm.patterns); in mpt_query_disk()
173 free(ccb.cdm.patterns); in mpt_query_disk()
176 (ccb.cdm.status != CAM_DEV_MATCH_LAST)) { in mpt_query_disk()
177 warnx("mpt_query_disk got CAM error %#x, CDM error %d\n", in mpt_query_disk()
178 ccb.ccb_h.status, ccb.cdm.status); in mpt_query_disk()
179 free(ccb.cdm.matches); in mpt_query_disk()
188 if (ccb.cdm.num_matches == 0) { in mpt_query_disk()
189 free(ccb.cdm.matches); in mpt_query_disk()
192 if (ccb.cdm.num_matches != 1) { in mpt_query_disk()
194 ccb.cdm.num_matches); in mpt_query_disk()
195 free(ccb.cdm.matches); in mpt_query_disk()
198 if (ccb.cdm.matches[0].type != DEV_MATCH_PERIPH) { in mpt_query_disk()
200 free(ccb.cdm.matches); in mpt_query_disk()
205 r = &ccb.cdm.matches[1].result.periph_result; in mpt_query_disk()
208 free(ccb.cdm.matches); in mpt_query_disk()
415 ccb.cdm.num_matches = 0; in mpt_fetch_disks()
416 ccb.cdm.match_buf_len = bufsize; in mpt_fetch_disks()
417 ccb.cdm.matches = calloc(1, bufsize); in mpt_fetch_disks()
420 ccb.cdm.num_patterns = 1; in mpt_fetch_disks()
421 ccb.cdm.pattern_buf_len = bufsize; in mpt_fetch_disks()
422 ccb.cdm.patterns = calloc(1, bufsize); in mpt_fetch_disks()
425 ccb.cdm.patterns[0].type = DEV_MATCH_PERIPH; in mpt_fetch_disks()
426 p = &ccb.cdm.patterns[0].pattern.periph_pattern; in mpt_fetch_disks()
433 free(ccb.cdm.matches); in mpt_fetch_disks()
434 free(ccb.cdm.patterns); in mpt_fetch_disks()
437 free(ccb.cdm.patterns); in mpt_fetch_disks()
441 free(ccb.cdm.matches); in mpt_fetch_disks()
446 if (ccb.cdm.status == CAM_DEV_MATCH_MORE) { in mpt_fetch_disks()
447 free(ccb.cdm.matches); in mpt_fetch_disks()
452 if (ccb.cdm.status != CAM_DEV_MATCH_LAST) { in mpt_fetch_disks()
453 free(ccb.cdm.matches); in mpt_fetch_disks()
460 if (ccb.cdm.num_matches == 0) { in mpt_fetch_disks()
461 free(ccb.cdm.matches); in mpt_fetch_disks()
468 for (i = 0; i < ccb.cdm.num_matches; i++) { in mpt_fetch_disks()
469 if (ccb.cdm.matches[i].type != DEV_MATCH_PERIPH) { in mpt_fetch_disks()
471 free(ccb.cdm.matches); in mpt_fetch_disks()
484 disks = calloc(ccb.cdm.num_matches, sizeof(*disks)); in mpt_fetch_disks()
486 for (i = 0; i < ccb.cdm.num_matches; i++) { in mpt_fetch_disks()
487 r = &ccb.cdm.matches[i].result.periph_result; in mpt_fetch_disks()
503 free(ccb.cdm.matches); in mpt_fetch_disks()