Lines Matching refs:desc

447 	kcf_provider_desc_t *desc;
452 if ((desc = kcf_prov_tab_lookup((crypto_provider_id_t)handle)) ==
458 mutex_enter(&desc->pd_lock);
463 if (desc->pd_state >= KCF_PROV_DISABLED) {
464 mutex_exit(&desc->pd_lock);
466 KCF_PROV_REFRELE(desc);
471 saved_state = desc->pd_state;
472 desc->pd_state = KCF_PROV_UNREGISTERING;
479 cv_broadcast(&desc->pd_resume_cv);
482 mutex_exit(&desc->pd_lock);
484 if (desc->pd_prov_type != CRYPTO_SW_PROVIDER) {
485 remove_provider(desc);
488 if (desc->pd_prov_type != CRYPTO_LOGICAL_PROVIDER) {
490 for (mech_idx = 0; mech_idx < desc->pd_mech_list_count;
493 desc->pd_mechanisms[mech_idx].cm_mech_name, desc);
501 KCF_PROV_REFRELE(desc);
506 delete_kstat(desc);
508 if (desc->pd_prov_type == CRYPTO_SW_PROVIDER) {
515 while (kcf_get_refcnt(desc, B_TRUE) > 1) {
527 for (i = 0; i < desc->pd_nbins; i++) {
528 mp = &(desc->pd_percpu_bins[i]);
538 mutex_enter(&desc->pd_lock);
539 desc->pd_state = KCF_PROV_UNREGISTERED;
540 mutex_exit(&desc->pd_lock);
542 kcf_do_notify(desc, B_FALSE);
546 KCF_PROV_REFRELE(desc);
548 if (kcf_get_refcnt(desc, B_TRUE) == 0) {
550 kcf_free_provider_desc(desc);
552 ASSERT(desc->pd_prov_type != CRYPTO_SW_PROVIDER);
571 "framework.", desc->pd_description);
577 desc->pd_description);
583 desc->pd_description, ret);
741 init_prov_mechs(crypto_provider_info_t *info, kcf_provider_desc_t *desc)
748 int mcount = desc->pd_mech_list_count;
750 if (desc->pd_prov_type == CRYPTO_LOGICAL_PROVIDER) {
753 bcopy(info->pi_mechanisms, desc->pd_mechanisms,
761 * descriptor. desc->pd_mechanisms has an extra crypto_mech_info_t
775 bcopy(info->pi_mechanisms, desc->pd_mechanisms,
778 rand_mi = &desc->pd_mechanisms[mcount - 1];
786 bcopy(info->pi_mechanisms, desc->pd_mechanisms,
795 for (mech_idx = 0; mech_idx < desc->pd_mech_list_count; mech_idx++) {
796 crypto_mech_info_t *mi = &desc->pd_mechanisms[mech_idx];
804 if ((err = kcf_add_mech_provider(mech_idx, desc, &pmd)) !=
821 if (desc_use_count == 0 && desc->pd_prov_type == CRYPTO_SW_PROVIDER)
833 desc->pd_mechanisms[cleanup_idx].cm_mech_name, desc);
891 undo_register_provider(kcf_provider_desc_t *desc, boolean_t remove_prov)
896 for (mech_idx = 0; mech_idx < desc->pd_mech_list_count;
899 desc->pd_mechanisms[mech_idx].cm_mech_name, desc);
904 (void) kcf_prov_tab_rem_provider(desc->pd_prov_id);
1082 delete_kstat(kcf_provider_desc_t *desc)
1085 if (desc->pd_kstat != NULL) {
1086 kcf_provider_desc_t *kspd = desc->pd_kstat->ks_private;
1088 /* release reference held by desc->pd_kstat->ks_private */
1089 ASSERT(desc == kspd);
1091 desc->pd_kstat = NULL;