Lines Matching refs:tp
51 smp_report_general(smp_target_t *tp)
58 if ((ap = smp_action_alloc(SMP_FUNC_REPORT_GENERAL, tp, 0)) == NULL)
61 if (smp_exec(ap, tp) != 0) {
73 bcopy(rp, &tp->st_repgen, sizeof (tp->st_repgen));
81 smp_report_manufacturer_information(smp_target_t *tp)
88 ap = smp_action_alloc(SMP_FUNC_REPORT_MANUFACTURER_INFO, tp, 0);
92 if (smp_exec(ap, tp) != 0) {
105 tp->st_vendor = smp_trim_strdup(rp->srmir_vendor_identification,
107 tp->st_product = smp_trim_strdup(rp->srmir_product_identification,
109 tp->st_revision = smp_trim_strdup(rp->srmir_product_revision_level,
113 tp->st_component_vendor =
117 tp->st_component_id = SCSI_READ16(&rp->srmir_component_id);
118 tp->st_component_revision = rp->srmir_component_revision_level;
121 if (tp->st_vendor == NULL || tp->st_product == NULL ||
122 tp->st_revision == NULL ||
123 (rp->srmir_sas_1_1_format && tp->st_component_vendor == NULL)) {
134 smp_target_fill(smp_target_t *tp)
136 if (smp_report_general(tp) != 0 ||
137 smp_report_manufacturer_information(tp) != 0)
144 smp_get_funcdef(smp_target_t *tp, int fn)
149 for (pp = tp->st_plugin_first; pp != NULL; pp = pp->sp_next) {
210 smp_plugin_loadone(smp_target_t *tp, const char *path, uint32_t pass)
227 pp->sp_target = tp;
244 for (loc = &tp->st_plugin_first; *loc != NULL; loc = &(*loc)->sp_next) {
252 tp->st_plugin_last = pp;
265 smp_plugin_load_dir(smp_target_t *tp, const char *pluginroot)
293 if (smp_plugin_loadone(tp, path, 0) != 0) {
314 if (smp_target_fill(tp) != 0)
317 if (tp->st_vendor == NULL)
320 if (tp->st_component_vendor != NULL) {
321 c_vendor = strdupa(tp->st_component_vendor);
325 vendor = strdupa(tp->st_vendor);
326 product = strdupa(tp->st_product);
327 revision = strdupa(tp->st_revision);
333 if (tp->st_component_vendor != NULL) {
337 if (smp_plugin_loadone(tp, path, 1) != 0)
343 tp->st_component_id, LIBSMP_PLUGIN_EXT);
344 if (smp_plugin_loadone(tp, path, 2) != 0)
350 tp->st_component_id, tp->st_component_revision,
352 if (smp_plugin_loadone(tp, path, 3) != 0)
358 if (smp_plugin_loadone(tp, path, 4) != 0)
363 if (smp_plugin_loadone(tp, path, 5) != 0)
369 if (smp_plugin_loadone(tp, path, 6) != 0)
376 smp_plugin_load(smp_target_t *tp)
403 if (smp_plugin_load_dir(tp, pluginroot) != 0)
407 if (tp->st_plugin_first == NULL)
414 smp_plugin_unload(smp_target_t *tp)
418 while ((pp = tp->st_plugin_first) != NULL) {
419 tp->st_plugin_first = pp->sp_next;