Lines Matching refs:msp
99 #define SETSTATE(msp, state) \ argument
101 (void *)msp, __LINE__, dss[msp->ms_dlpistate], \
103 msp->ms_dlpistate = (state);
239 #define SETSTATE(msp, state) msp->ms_dlpistate = (state); argument
1199 manstr_t *msp; in man_open() local
1220 msp = man_kzalloc(sizeof (manstr_t), KM_SLEEP); in man_open()
1221 SETSTATE(msp, DL_UNATTACHED); in man_open()
1222 msp->ms_meta_ppa = -1; in man_open()
1223 msp->ms_rq = rq; in man_open()
1224 rq->q_ptr = WR(rq)->q_ptr = msp; in man_open()
1304 msp->ms_meta_maj = getmajor(*devp); in man_open()
1305 msp->ms_minor = minordev; in man_open()
1307 msp->ms_flags = MAN_SFLAG_CONTROL; in man_open()
1312 msp->ms_next = *prevmsp; in man_open()
1313 *prevmsp = msp; in man_open()
1332 man_kfree((char *)msp, sizeof (manstr_t)); in man_open()
1431 manstr_t *msp; in man_close() local
1444 for (msp = man_strup; msp && msp->ms_next != close_msp; ) in man_close()
1445 msp = msp->ms_next; in man_close()
1447 if (msp == NULL) { in man_close()
1452 msp->ms_next = close_msp->ms_next; in man_close()
1486 man_dodetach(manstr_t *msp, man_work_t *wp) in man_dodetach() argument
1492 mdp = msp->ms_dests; in man_dodetach()
1493 msp->ms_dests = NULL; in man_dodetach()
1494 msp->ms_destp = NULL; in man_dodetach()
1529 man_dl_clean(&msp->ms_dl_mp); in man_dodetach()
1530 man_dl_clean(&msp->ms_dlioc_mp); in man_dodetach()
1535 msp->ms_flags &= ~MAN_SFLAG_FAST; in man_dodetach()
1548 msp->ms_manp->man_refcnt--; in man_dodetach()
1551 msp->ms_manp = NULL; in man_dodetach()
1567 register manstr_t *msp; /* per stream data */ in man_uwput() local
1570 msp = (manstr_t *)wq->q_ptr; in man_uwput()
1574 (void *)wq, (void *)mp, DB_TYPE(mp), (void *)msp)); in man_uwput()
1594 manp = msp->ms_manp; in man_uwput()
1596 if (((msp->ms_flags & (MAN_SFLAG_FAST | MAN_SFLAG_RAW)) == 0) || in man_uwput()
1597 (msp->ms_dlpistate != DL_IDLE) || in man_uwput()
1691 register manstr_t *msp; /* per stream data */ in man_start() local
1697 msp = (manstr_t *)wq->q_ptr; in man_start()
1700 (void *)msp, ether_sprintf(eap))); in man_start()
1702 if (msp->ms_dests == NULL) { in man_start()
1711 mdp = msp->ms_destp; in man_start()
1723 mdp = &msp->ms_dests[i]; in man_start()
1754 mdp = &msp->ms_dests[i]; in man_start()
1953 manstr_t *msp; in man_ioctl() local
1957 msp = (manstr_t *)wq->q_ptr; in man_ioctl()
2011 if (man_dlioc(msp, mp)) in man_ioctl()
2014 msp->ms_flags |= MAN_SFLAG_RAW; in man_ioctl()
2296 manstr_t *msp; in man_dl_ioc_hdr_info() local
2307 msp = (manstr_t *)wq->q_ptr; in man_dl_ioc_hdr_info()
2308 manp = msp->ms_manp; in man_dl_ioc_hdr_info()
2342 if (!(msp->ms_flags & MAN_SFLAG_FAST)) in man_dl_ioc_hdr_info()
2343 status = man_dl_catch(&msp->ms_dlioc_mp, mp); in man_dl_ioc_hdr_info()
2346 if ((status != 0) || ((status = man_dlpi_senddown(msp, mp)) != 0)) { in man_dl_ioc_hdr_info()
2373 msp = (manstr_t *)wq->q_ptr; in man_dl_ioc_hdr_info()
2374 msp->ms_flags |= MAN_SFLAG_FAST; in man_dl_ioc_hdr_info()
2392 manstr_t *msp; /* per stream data */ in man_uwsrv() local
2397 msp = (manstr_t *)wq->q_ptr; in man_uwsrv()
2400 MAN_DBGCALL(MAN_UWSRV, man_print_msp(msp)); in man_uwsrv()
2402 if (msp == NULL) in man_uwsrv()
2405 manp = msp->ms_manp; in man_uwsrv()
2455 if ((msp->ms_flags & MAN_SFLAG_CONTROL) && in man_uwsrv()
2557 manstr_t *msp; in man_udreq() local
2564 msp = (manstr_t *)wq->q_ptr; in man_udreq()
2567 if (msp->ms_dlpistate != DL_IDLE) { in man_udreq()
2605 manstr_t *msp; /* per stream data */ in man_areq() local
2613 msp = (manstr_t *)wq->q_ptr; in man_areq()
2624 if (msp->ms_dlpistate != DL_UNATTACHED) { in man_areq()
2659 if (man_dlpi(msp, mp)) { in man_areq()
2666 if (man_dlpi(msp, preq)) { in man_areq()
2675 msp->ms_manp = manp; in man_areq()
2676 msp->ms_meta_ppa = ppa; in man_areq()
2681 ASSERT(msp->ms_dests == NULL); in man_areq()
2682 if (man_init_dests(manp, msp)) { in man_areq()
2690 while ((tmp = msp->ms_dl_mp) != NULL) { in man_areq()
2691 msp->ms_dl_mp = msp->ms_dl_mp->b_next; in man_areq()
2696 msp->ms_manp = NULL; in man_areq()
2697 msp->ms_meta_ppa = -1; in man_areq()
2707 SETSTATE(msp, DL_UNBOUND); in man_areq()
2731 man_init_dests(man_t *manp, manstr_t *msp) in man_init_dests() argument
2741 msp->ms_dests = mdp; in man_init_dests()
2752 man_start_dest(&mdp[i], msp, mpg); in man_init_dests()
2763 man_start_dest(man_dest_t *mdp, manstr_t *msp, man_pg_t *mpg) in man_start_dest() argument
2769 mdp->md_msp = msp; in man_start_dest()
2770 mdp->md_rq = msp->ms_rq; in man_start_dest()
2773 ASSERT(msp->ms_manp); in man_start_dest()
2775 ether_copy(&msp->ms_manp->man_eaddr, &mdp->md_src_eaddr); in man_start_dest()
2795 man_set_optimized_dest(msp); in man_start_dest()
2802 man_set_optimized_dest(manstr_t *msp) in man_set_optimized_dest() argument
2809 if (msp->ms_dests[i].md_msp != NULL) { in man_set_optimized_dest()
2811 mdp = &msp->ms_dests[i]; in man_set_optimized_dest()
2816 msp->ms_destp = mdp; in man_set_optimized_dest()
2818 msp->ms_destp = NULL; in man_set_optimized_dest()
2827 man_dlpi(manstr_t *msp, mblk_t *mp) in man_dlpi() argument
2831 status = man_dl_catch(&msp->ms_dl_mp, mp); in man_dlpi()
2833 status = man_dlpi_senddown(msp, mp); in man_dlpi()
2842 man_dlioc(manstr_t *msp, mblk_t *mp) in man_dlioc() argument
2846 status = man_dl_catch(&msp->ms_dlioc_mp, mp); in man_dlioc()
2848 status = man_dlpi_senddown(msp, mp); in man_dlioc()
2906 man_dlpi_senddown(manstr_t *msp, mblk_t *mp) in man_dlpi_senddown() argument
2915 if (msp->ms_dests == NULL) in man_dlpi_senddown()
2919 mdp = &msp->ms_dests[i]; in man_dlpi_senddown()
2948 mdp = &msp->ms_dests[i]; in man_dlpi_senddown()
3012 manstr_t *msp; /* per stream data */ in man_dreq() local
3015 msp = (manstr_t *)wq->q_ptr; in man_dreq()
3022 if (msp->ms_dlpistate != DL_UNBOUND) { in man_dreq()
3027 ASSERT(msp->ms_dests != NULL); in man_dreq()
3034 man_dodetach(msp, wp); in man_dreq()
3037 SETSTATE(msp, DL_UNATTACHED); in man_dreq()
3198 manstr_t *msp; /* per stream data */ in man_breq() local
3204 msp = (manstr_t *)wq->q_ptr; in man_breq()
3211 if (msp->ms_dlpistate != DL_UNBOUND) { in man_breq()
3217 manp = msp->ms_manp; /* valid after attach */ in man_breq()
3233 if (man_dlpi(msp, mp)) { in man_breq()
3238 msp->ms_sap = sap; in man_breq()
3240 SETSTATE(msp, DL_IDLE); in man_breq()
3242 man_addr.dl_sap = msp->ms_sap; in man_breq()
3243 ether_copy(&msp->ms_manp->man_eaddr, &man_addr.dl_phys); in man_breq()
3245 dlbindack(wq, mp, msp->ms_sap, &man_addr, MAN_ADDRL, 0, 0); in man_breq()
3252 manstr_t *msp; /* per stream data */ in man_ubreq() local
3254 msp = (manstr_t *)wq->q_ptr; in man_ubreq()
3261 if (msp->ms_dlpistate != DL_IDLE) { in man_ubreq()
3266 if (man_dlpi_senddown(msp, mp)) { in man_ubreq()
3271 man_dl_release(&msp->ms_dl_mp, mp); in man_ubreq()
3273 SETSTATE(msp, DL_UNBOUND); in man_ubreq()
3282 manstr_t *msp; in man_ireq() local
3288 msp = (manstr_t *)wq->q_ptr; in man_ireq()
3306 dlip->dl_current_state = msp->ms_dlpistate; in man_ireq()
3308 dlap->dl_sap = msp->ms_sap; in man_ireq()
3313 if (msp->ms_manp != NULL) { in man_ireq()
3314 ether_copy(&msp->ms_manp->man_eaddr, &dlap->dl_phys); in man_ireq()
3330 manstr_t *msp; in man_ponreq() local
3333 msp = (manstr_t *)wq->q_ptr; in man_ponreq()
3362 if (man_dlpi(msp, mp)) { in man_ponreq()
3367 msp->ms_flags |= flag; in man_ponreq()
3376 manstr_t *msp; in man_poffreq() local
3379 msp = (manstr_t *)wq->q_ptr; in man_poffreq()
3404 if ((msp->ms_flags & flag) == 0) { in man_poffreq()
3409 if (man_dlpi_senddown(msp, mp)) { in man_poffreq()
3414 man_dl_release(&msp->ms_dl_mp, mp); in man_poffreq()
3416 msp->ms_flags &= ~flag; in man_poffreq()
3429 manstr_t *msp; in man_emreq() local
3435 msp = (manstr_t *)wq->q_ptr; in man_emreq()
3442 if (msp->ms_dlpistate == DL_UNATTACHED) { in man_emreq()
3463 if (man_dlpi(msp, mp)) { in man_emreq()
3475 manstr_t *msp; in man_dmreq() local
3481 msp = (manstr_t *)wq->q_ptr; in man_dmreq()
3488 if (msp->ms_dlpistate == DL_UNATTACHED) { in man_dmreq()
3505 if (man_dlpi_senddown(msp, mp)) { in man_dmreq()
3510 man_dl_release(&msp->ms_dl_mp, mp); in man_dmreq()
3519 manstr_t *msp; in man_pareq() local
3524 msp = (manstr_t *)wq->q_ptr; in man_pareq()
3533 if (msp->ms_manp == NULL) { in man_pareq()
3544 ether_bcopy(&msp->ms_manp->man_eaddr, &addr); in man_pareq()
3562 manstr_t *msp; in man_spareq() local
3568 msp = (manstr_t *)wq->q_ptr; in man_spareq()
3599 if (msp->ms_manp == NULL) { in man_spareq()
3608 if (man_dlpi_senddown(msp, mp)) { in man_spareq()
3613 ether_copy(addrp, msp->ms_manp->man_eaddr.ether_addr_octet); in man_spareq()
3616 ether_sprintf(&msp->ms_manp->man_eaddr))); in man_spareq()
3716 manstr_t *msp; in man_lrput() local
3766 msp = mdp->md_msp; in man_lrput()
3767 if (!(msp->ms_flags & MAN_SFLAG_PROMISC)) in man_lrput()
4601 manstr_t *msp; in man_switch_match() local
4603 for (msp = man_strup; msp != NULL; msp = msp->ms_next) { in man_switch_match()
4607 if (msp != sdp->md_msp) in man_switch_match()
4610 if (msp->ms_dests == NULL) in man_switch_match()
4613 mdp = &msp->ms_dests[pg_id]; in man_switch_match()
4671 manstr_t *msp; in man_reset_dlpi() local
4683 msp = mdp->md_msp; in man_reset_dlpi()
4685 rmp = man_dup_mplist(msp->ms_dl_mp); in man_reset_dlpi()
4874 manstr_t *msp; in man_add_dests() local
4877 for (msp = man_strup; msp != NULL; msp = msp->ms_next) { in man_add_dests()
4879 if (!man_str_uses_pg(msp, mpg)) in man_add_dests()
4882 mdp = &msp->ms_dests[mpg->mpg_pg_id]; in man_add_dests()
4894 man_start_dest(mdp, msp, mpg); in man_add_dests()
4902 manstr_t *msp; in man_remove_dests() local
4920 for (msp = man_strup; msp != NULL; msp = msp->ms_next) { in man_remove_dests()
4921 if (!man_str_uses_pg(msp, mpg)) in man_remove_dests()
4938 for (msp = man_strup; msp != NULL; msp = msp->ms_next) { in man_remove_dests()
4939 if (!man_str_uses_pg(msp, mpg)) in man_remove_dests()
4942 mdp = &msp->ms_dests[mpg->mpg_pg_id]; in man_remove_dests()
4953 man_set_optimized_dest(msp); in man_remove_dests()
4993 man_str_uses_pg(manstr_t *msp, man_pg_t *mpg) in man_str_uses_pg() argument
4997 status = ((msp->ms_flags & MAN_SFLAG_CONTROL) || in man_str_uses_pg()
4998 (msp->ms_dests == NULL) || in man_str_uses_pg()
4999 (msp->ms_manp == NULL) || in man_str_uses_pg()
5000 (msp->ms_manp->man_meta_ppa != mpg->mpg_man_ppa)); in man_str_uses_pg()
5368 manstr_t *msp; in man_prep_dests_for_switch() local
5382 for (msp = man_strup; msp != NULL; msp = msp->ms_next) { in man_prep_dests_for_switch()
5383 if (man_str_uses_pg(msp, mpg)) in man_prep_dests_for_switch()
5399 for (msp = man_strup; msp != NULL; msp = msp->ms_next) { in man_prep_dests_for_switch()
5400 if (man_str_uses_pg(msp, mpg)) { in man_prep_dests_for_switch()
5407 mdp = &msp->ms_dests[mpg->mpg_pg_id]; in man_prep_dests_for_switch()
7692 manstr_t *msp; in man_sum_dests_kstats() local
7702 for (msp = man_strup; msp != NULL; msp = msp->ms_next) { in man_sum_dests_kstats()
7704 if (!man_str_uses_pg(msp, mpg)) in man_sum_dests_kstats()
7707 mdp = &msp->ms_dests[mpg->mpg_pg_id]; in man_sum_dests_kstats()
8007 man_print_msp(manstr_t *msp) in man_print_msp() argument
8014 cmn_err(CE_CONT, "\tmsp(0x%p)\n", (void *)msp); in man_print_msp()
8016 if (msp == NULL) in man_print_msp()
8020 ddi_major_to_name(msp->ms_meta_maj), msp->ms_meta_ppa, in man_print_msp()
8021 msp->ms_sap); in man_print_msp()
8025 flags = msp->ms_flags; in man_print_msp()
8035 cmn_err(CE_CONT, "\tms_dlpistate: %s\n", dss[msp->ms_dlpistate]); in man_print_msp()
8037 cmn_err(CE_CONT, "\tms_dl_mp: 0x%p\n", (void *)msp->ms_dl_mp); in man_print_msp()
8039 cmn_err(CE_CONT, "\tms_manp: 0x%p\n", (void *)msp->ms_manp); in man_print_msp()
8041 cmn_err(CE_CONT, "\tms_dests: 0x%p\n", (void *)msp->ms_dests); in man_print_msp()