Lines Matching refs:addrid

406 	id_t addrid;  in damap_addr_add()  local
418 ((addrid = dam_get_addrid(mapp, address)) == 0)) { in damap_addr_add()
423 passp = ddi_get_soft_state(mapp->dam_da, addrid); in damap_addr_add()
430 if (DAM_IN_REPORT(mapp, addrid)) { in damap_addr_add()
435 dam_addr_report_release(mapp, addrid); in damap_addr_add()
442 dam_addr_report(mapp, passp, addrid, RPT_ADDR_ADD); in damap_addr_add()
444 *addridp = (damap_id_t)addrid; in damap_addr_add()
463 id_t addrid; in damap_addr_del() local
482 if (!(addrid = ddi_strid_str2id(mapp->dam_addr_hash, address))) { in damap_addr_del()
486 passp = ddi_get_soft_state(mapp->dam_da, addrid); in damap_addr_del()
488 if (DAM_IN_REPORT(mapp, addrid)) { in damap_addr_del()
493 dam_addr_report_release(mapp, addrid); in damap_addr_del()
496 dam_addr_report(mapp, passp, addrid, RPT_ADDR_DEL); in damap_addr_del()
626 id_t addrid; in damap_addrset_add() local
641 if ((addrid = dam_get_addrid(mapp, address)) == 0) { in damap_addrset_add()
646 passp = ddi_get_soft_state(mapp->dam_da, addrid); in damap_addrset_add()
648 if (DAM_IN_REPORT(mapp, addrid)) { in damap_addrset_add()
652 dam_addr_report_release(mapp, addrid); in damap_addrset_add()
658 bitset_add(&mapp->dam_report_set, addrid); in damap_addrset_add()
660 *ridx = (damap_id_t)addrid; in damap_addrset_add()
719 damap_id2nvlist(damap_t *damapp, damap_id_t addrid) in damap_id2nvlist() argument
724 if (mapp->dam_high && ddi_strid_id2str(mapp->dam_addr_hash, addrid)) { in damap_id2nvlist()
725 if (pass = ddi_get_soft_state(mapp->dam_da, addrid)) in damap_id2nvlist()
741 damap_id2addr(damap_t *damapp, damap_id_t addrid) in damap_id2addr() argument
746 return (ddi_strid_id2str(mapp->dam_addr_hash, addrid)); in damap_id2addr()
758 damap_id_rele(damap_t *damapp, damap_id_t addrid) in damap_id_rele() argument
764 passp = ddi_get_soft_state(mapp->dam_da, (id_t)addrid); in damap_id_rele()
767 addr = damap_id2addr(damapp, addrid); in damap_id_rele()
778 dam_addr_release(mapp, (id_t)addrid); in damap_id_rele()
793 damap_id_ref(damap_t *damapp, damap_id_t addrid) in damap_id_ref() argument
799 passp = ddi_get_soft_state(mapp->dam_da, (id_t)addrid); in damap_id_ref()
845 damap_id_priv_set(damap_t *damapp, damap_id_t addrid, void *cfg_priv) in damap_id_priv_set() argument
851 passp = ddi_get_soft_state(mapp->dam_da, (id_t)addrid); in damap_id_priv_set()
869 damap_id_priv_get(damap_t *damapp, damap_id_t addrid) in damap_id_priv_get() argument
876 passp = ddi_get_soft_state(mapp->dam_da, (id_t)addrid); in damap_id_priv_get()
901 id_t addrid = 0; in damap_lookup() local
909 addrid = 0; in damap_lookup()
911 addrid = ddi_strid_str2id(mapp->dam_addr_hash, address); in damap_lookup()
912 if (addrid) { in damap_lookup()
913 if (DAM_IS_STABLE(mapp, addrid)) { in damap_lookup()
914 passp = ddi_get_soft_state(mapp->dam_da, addrid); in damap_lookup()
919 addrid = 0; in damap_lookup()
922 addrid = 0; in damap_lookup()
928 char *, address, int, addrid); in damap_lookup()
929 return ((damap_id_t)addrid); in damap_lookup()
1021 dam_addr_activate(dam_t *mapp, id_t addrid) in dam_addr_activate() argument
1028 bitset_add(&mapp->dam_active_set, addrid); in dam_addr_activate()
1029 passp = ddi_get_soft_state(mapp->dam_da, addrid); in dam_addr_activate()
1035 addrstr = ddi_strid_id2str(mapp->dam_addr_hash, addrid); in dam_addr_activate()
1048 addrid, &passp->da_ppriv_rpt); in dam_addr_activate()
1056 addrid); in dam_addr_activate()
1064 dam_deact_cleanup(mapp, addrid, addrstr, in dam_addr_activate()
1077 dam_addr_deactivate(dam_t *mapp, id_t addrid) in dam_addr_deactivate() argument
1081 addrstr = ddi_strid_id2str(mapp->dam_addr_hash, addrid); in dam_addr_deactivate()
1089 (*mapp->dam_unconfig_cb)(mapp->dam_config_arg, mapp, addrid); in dam_addr_deactivate()
1090 dam_deact_cleanup(mapp, addrid, addrstr, DAMAP_DEACT_RSN_GONE); in dam_addr_deactivate()
1094 dam_deact_cleanup(dam_t *mapp, id_t addrid, char *addrstr, in dam_deact_cleanup() argument
1099 passp = ddi_get_soft_state(mapp->dam_da, addrid); in dam_deact_cleanup()
1103 ddi_strid_id2str(mapp->dam_addr_hash, addrid), in dam_deact_cleanup()
1104 addrid, passp->da_ppriv, deact_rsn); in dam_deact_cleanup()
1111 bitset_del(&mapp->dam_active_set, addrid); in dam_deact_cleanup()
1123 (void) dam_addr_release(mapp, addrid); in dam_deact_cleanup()
1248 dam_addr_release(dam_t *mapp, id_t addrid) in dam_addr_release() argument
1255 passp = ddi_get_soft_state(mapp->dam_da, addrid); in dam_addr_release()
1258 addrstr = ddi_strid_id2str(mapp->dam_addr_hash, addrid); in dam_addr_release()
1277 if (DAM_IN_REPORT(mapp, addrid)) { in dam_addr_release()
1284 ddi_strid_free(mapp->dam_addr_hash, addrid); in dam_addr_release()
1285 ddi_soft_state_free(mapp->dam_da, addrid); in dam_addr_release()
1605 dam_addr_report(dam_t *mapp, dam_da_t *passp, id_t addrid, int rpt_type) in dam_addr_report() argument
1607 char *addrstr = damap_id2addr((damap_t *)mapp, addrid); in dam_addr_report()
1614 ASSERT(!DAM_IN_REPORT(mapp, addrid)); in dam_addr_report()
1623 bitset_add(&mapp->dam_report_set, addrid); in dam_addr_report()
1631 dam_addr_report_release(dam_t *mapp, id_t addrid) in dam_addr_report_release() argument
1634 char *addrstr = damap_id2addr((damap_t *)mapp, addrid); in dam_addr_report_release()
1641 passp = ddi_get_soft_state(mapp->dam_da, addrid); in dam_addr_report_release()
1649 bitset_del(&mapp->dam_report_set, addrid); in dam_addr_report_release()
1650 if (!DAM_IS_STABLE(mapp, addrid) && mapp->dam_deactivate_cb && in dam_addr_report_release()
1654 ddi_strid_id2str(mapp->dam_addr_hash, addrid), in dam_addr_report_release()
1655 addrid, passp->da_ppriv_rpt, DAMAP_DEACT_RSN_UNSTBL); in dam_addr_report_release()
1668 damap_id_t addrid; in dam_get_addrid() local
1672 if ((addrid = ddi_strid_str2id(mapp->dam_addr_hash, address)) == 0) { in dam_get_addrid()
1673 if ((addrid = ddi_strid_alloc(mapp->dam_addr_hash, in dam_get_addrid()
1677 if (ddi_soft_state_zalloc(mapp->dam_da, addrid) != in dam_get_addrid()
1679 ddi_strid_free(mapp->dam_addr_hash, addrid); in dam_get_addrid()
1683 if (addrid >= mapp->dam_high) in dam_get_addrid()
1684 mapp->dam_high = addrid + 1; in dam_get_addrid()
1696 passp = ddi_get_soft_state(mapp->dam_da, addrid); in dam_get_addrid()
1699 addrid); /* for mdb */ in dam_get_addrid()
1701 return (addrid); in dam_get_addrid()