Home
last modified time | relevance | path

Searched refs:mh (Results 1 – 25 of 93) sorted by relevance

1234

/titanic_41/usr/src/uts/common/io/mii/
H A Dmii.c189 _mii_error(mii_handle_t mh, int errno) in _mii_error() argument
195 if (mh->m_error != errno) { in _mii_error()
196 cmn_err(CE_WARN, "%s: %s", mh->m_name, mii_errors[errno]); in _mii_error()
197 mh->m_error = errno; in _mii_error()
223 mii_handle_t mh; in mii_alloc_instance() local
231 mh = kmem_zalloc(sizeof (*mh), KM_SLEEP); in mii_alloc_instance()
233 (void) snprintf(mh->m_name, sizeof (mh->m_name), "%s%d", in mii_alloc_instance()
239 mh->m_dip = dip; in mii_alloc_instance()
240 mh->m_ops = *ops; in mii_alloc_instance()
241 mh->m_private = private; in mii_alloc_instance()
[all …]
/titanic_41/usr/src/cmd/mdb/common/modules/genunix/
H A Dmodhash.c118 mod_hash_t mh; in modhash_walk_step() local
124 if (mdb_vread(&mh, sizeof (mh), wsp->walk_addr) == -1) { in modhash_walk_step()
129 status = wsp->walk_callback(wsp->walk_addr, &mh, wsp->walk_cbdata); in modhash_walk_step()
131 wsp->walk_addr = (uintptr_t)mh.mh_next; in modhash_walk_step()
142 mod_hash_t mh; in modent_walk_init() local
151 if (mdb_vread(&mh, sizeof (mh), wsp->walk_addr) == -1) { in modent_walk_init()
156 if (mh.mh_nchains <= 1) { in modent_walk_init()
167 hwp = mdb_alloc(HW_SIZE(mh.mh_nchains), UM_NOSLEEP); in modent_walk_init()
170 HW_SIZE(mh.mh_nchains), wsp->walk_addr); in modent_walk_init()
174 (void) memcpy(&hwp->hwalk_hash, &mh, sizeof (hwp->hwalk_hash)); in modent_walk_init()
[all …]
/titanic_41/usr/src/uts/common/io/cxgbe/cxgbe/
H A Dcxgbe.c123 mac_handle_t mh; in cxgbe_devo_attach() local
150 rc = mac_register(mac, &mh); in cxgbe_devo_attach()
158 pi->mh = mh; in cxgbe_devo_attach()
166 mac_link_update(mh, LINK_STATE_UNKNOWN); in cxgbe_devo_attach()
177 mac_handle_t mh; in cxgbe_devo_detach() local
186 mh = pi->mh; in cxgbe_devo_detach()
187 pi->mh = NULL; in cxgbe_devo_detach()
189 return (mac_unregister(mh)); in cxgbe_devo_detach()
/titanic_41/usr/src/cmd/mdb/sun4v/modules/mdesc/
H A Dmdesc.c82 md_header_t mh; in mdinfo() local
111 if (mdb_vread(&mh, sizeof (mh), vaddr) == -1) { in mdinfo()
116 mdesize = mh.node_blk_sz; in mdinfo()
117 namesize = mh.name_blk_sz; in mdinfo()
118 datasize = mh.data_blk_sz; in mdinfo()
239 md_header_t mh; in mddump() local
261 if (mdb_vread(&mh, sizeof (mh), (uintptr_t)vaddr) == -1) { in mddump()
267 namep = mdep + mh.node_blk_sz; in mddump()
268 datap = namep + mh.name_blk_sz; in mddump()
275 if (mdformat(mdep, mh.node_blk_sz, 2) != DCMD_OK) in mddump()
[all …]
/titanic_41/usr/src/cmd/mandoc/
H A Dman_html.c43 struct mhtml *mh, \
150 struct mhtml mh; in html_man() local
152 memset(&mh, 0, sizeof(struct mhtml)); in html_man()
153 print_man(man_meta(man), man_node(man), &mh, (struct html *)arg); in html_man()
169 print_man_head(man, n, mh, h); in print_man()
176 print_man_nodelist(man, n, mh, h); in print_man()
199 print_man_node(man, n, mh, h); in print_man_nodelist()
201 print_man_nodelist(man, n->next, mh, h); in print_man_nodelist()
216 man_root_pre(man, n, mh, h); in print_man_node()
231 else if (MANH_LITERAL & mh->fl && n->prev) in print_man_node()
[all …]
/titanic_41/usr/src/uts/common/io/mac/
H A Dmac_provider.c501 mac_unregister(mac_handle_t mh) in mac_unregister() argument
504 mac_impl_t *mip = (mac_impl_t *)mh; in mac_unregister()
509 if ((err = mac_disable_nowait(mh)) != 0) in mac_unregister()
615 mac_rx_ring(mac_handle_t mh, mac_ring_handle_t mrh, mblk_t *mp_chain, in mac_rx_ring() argument
626 mac_rx(mh, (mac_resource_handle_t)mrh, mp_chain); in mac_rx_ring()
633 mac_rx(mac_handle_t mh, mac_resource_handle_t mrh, mblk_t *mp_chain) in mac_rx() argument
635 mac_impl_t *mip = (mac_impl_t *)mh; in mac_rx()
643 mac_rx_common(mh, mrh, mp_chain); in mac_rx()
651 if ((mh = mip->mi_bridge_link) != NULL) in mac_rx()
652 mac_bridge_ref_cb(mh, B_TRUE); in mac_rx()
[all …]
H A Dmac_client.c403 mac_close(mac_handle_t mh) in mac_close() argument
405 mac_impl_t *mip = (mac_impl_t *)mh; in mac_close()
430 mac_info(mac_handle_t mh) in mac_info() argument
432 return (&((mac_impl_t *)mh)->mi_info); in mac_info()
436 mac_devinfo_get(mac_handle_t mh) in mac_devinfo_get() argument
438 return (((mac_impl_t *)mh)->mi_dip); in mac_devinfo_get()
442 mac_driver(mac_handle_t mh) in mac_driver() argument
444 return (((mac_impl_t *)mh)->mi_driver); in mac_driver()
448 mac_name(mac_handle_t mh) in mac_name() argument
450 return (((mac_impl_t *)mh)->mi_name); in mac_name()
[all …]
H A Dmac.c948 mac_perim_held(mac_handle_t mh) in mac_perim_held() argument
950 mac_impl_t *mip = (mac_impl_t *)mh; in mac_perim_held()
969 mac_perim_enter_by_mh(mac_handle_t mh, mac_perim_handle_t *mphp) in mac_perim_enter_by_mh() argument
971 mac_impl_t *mip = (mac_impl_t *)mh; in mac_perim_enter_by_mh()
986 mac_handle_t mh; in mac_perim_enter_by_macname() local
988 if ((err = mac_open(name, &mh)) != 0) in mac_perim_enter_by_macname()
991 mac_perim_enter_by_mh(mh, mphp); in mac_perim_enter_by_macname()
992 MAC_ENCODE_MPH(*mphp, mh, 1); in mac_perim_enter_by_macname()
1000 mac_handle_t mh; in mac_perim_enter_by_linkid() local
1002 if ((err = mac_open_by_linkid(linkid, &mh)) != 0) in mac_perim_enter_by_linkid()
[all …]
H A Dmac_hio.c43 mac_share_capable(mac_handle_t mh) in mac_share_capable() argument
45 mac_impl_t *mip = (mac_impl_t *)mh; in mac_share_capable()
/titanic_41/usr/src/uts/common/inet/sockmods/
H A Dsockmod_pfp.c589 mac_handle_t mh; in sdpfp_bind() local
598 error = pfp_open_index(addr_ll->sll_ifindex, &mh, &mch, cred); in sdpfp_bind()
607 pfp_close(mh, mch); in sdpfp_bind()
610 ps->ps_mh = mh; in sdpfp_bind()
740 mac_handle_t mh; in sdpfp_senduio() local
751 mh = ps->ps_mh; in sdpfp_senduio()
787 error = pfp_open_index(sol->sll_ifindex, &mh, &mch, in sdpfp_senduio()
793 mac_sdu_get(mh, NULL, &maxsdu); in sdpfp_senduio()
819 mp0 = mac_header(mh, sol->sll_addr, sol->sll_protocol, mp, 0); in sdpfp_senduio()
847 ASSERT(mh != ps->ps_mh); in sdpfp_senduio()
[all …]
/titanic_41/usr/src/uts/common/io/
H A Dgldutil.c147 struct ether_header *mh; in gld_interpret_ether() local
165 mh = (struct ether_header *)mp->b_rptr; in gld_interpret_ether()
166 pktinfo->ethertype = REF_NET_USHORT(mh->ether_type); in gld_interpret_ether()
167 pktinfo->isForMe = mac_eq(&mh->ether_dhost, in gld_interpret_ether()
195 mh = (struct ether_header *)mp->b_rptr; in gld_interpret_ether()
198 if (mac_eq(&mh->ether_dhost, ether_broadcast, macinfo->gldm_addrlen)) in gld_interpret_ether()
200 else if (mh->ether_dhost.ether_addr_octet[0] & 1) in gld_interpret_ether()
203 typelen = REF_NET_USHORT(mh->ether_type); in gld_interpret_ether()
256 mac_copy(&mh->ether_dhost, pktinfo->dhost, macinfo->gldm_addrlen); in gld_interpret_ether()
257 mac_copy(&mh->ether_shost, pktinfo->shost, macinfo->gldm_addrlen); in gld_interpret_ether()
[all …]
H A Dbridge.c1145 mac_handle_t mh = blp->bl_mh; in link_shutdown() local
1163 mac_bridge_clear(mh, (mac_handle_t)blp); in link_shutdown()
1167 (void) mac_margin_remove(mh, blp->bl_margin); in link_shutdown()
1213 mac_close(mh); in link_shutdown()
2213 bridge_recv_cb(mac_handle_t mh, mac_resource_handle_t rsrc, mblk_t *mpnext) in bridge_recv_cb() argument
2216 bridge_link_t *blp = (bridge_link_t *)mh; in bridge_recv_cb()
2443 bridge_xmit_cb(mac_handle_t mh, mac_ring_handle_t rh, mblk_t *mpnext) in bridge_xmit_cb() argument
2445 bridge_link_t *blp = (bridge_link_t *)mh; in bridge_xmit_cb()
2690 bridge_ref_cb(mac_handle_t mh, boolean_t hold) in bridge_ref_cb() argument
2692 bridge_link_t *blp = (bridge_link_t *)mh; in bridge_ref_cb()
[all …]
/titanic_41/usr/src/cmd/sgs/libelf/common/
H A Dgetarhdr.c42 Member * mh; in elf_getarhdr() local
48 if ((mh = elf->ed_armem) == 0) { in elf_getarhdr()
53 if (mh->m_err != 0) { in elf_getarhdr()
56 _elf_seterr((Msg)mh->m_err, 0); in elf_getarhdr()
H A Dbegin.c54 Member *mh; in _elf_member() local
70 OK_YES) || ((mh = _elf_armem(ref, in _elf_member()
75 if (ref->ed_fsz - base < mh->m_hdr.ar_size) { in _elf_member()
87 elf->ed_armem = mh; in _elf_member()
88 elf->ed_fsz = mh->m_hdr.ar_size; in _elf_member()
90 elf->ed_memoff = base - mh->m_slide; in _elf_member()
97 elf->ed_ident = ref->ed_ident + base - mh->m_slide; in _elf_member()
/titanic_41/usr/src/cmd/mdb/common/modules/mpt_sas/
H A Dmpt_sas.c252 refhash_t mh; in krefhash_first() local
257 mdb_vread(&mh, sizeof (mh), khp); in krefhash_first()
258 klp = klist_head(&mh.rh_objs, khp + offsetof(refhash_t, rh_objs)); in krefhash_first()
262 kop = klp - mh.rh_link_off; in krefhash_first()
265 rp = mdb_alloc(mh.rh_obj_size, UM_SLEEP); in krefhash_first()
266 mdb_vread(rp, mh.rh_obj_size, kop); in krefhash_first()
274 refhash_t mh; in krefhash_next() local
282 mdb_vread(&mh, sizeof (mh), khp); in krefhash_next()
284 lp = (refhash_link_t *)(((char *)(op)) + mh.rh_link_off); in krefhash_next()
286 while ((klp = klist_next(&mh.rh_objs, in krefhash_next()
[all …]
/titanic_41/usr/src/uts/common/io/rtls/
H A Drtls.c384 mac_tx_update(rtlsp->mh); in rtls_attach()
537 if (mac_register(macp, &rtlsp->mh) != 0) { in rtls_attach()
601 if (mac_unregister(rtlsp->mh) != 0) { in rtls_detach()
984 mac_name(rtlsp->mh)); in rtls_send()
1001 mac_name(rtlsp->mh)); in rtls_send()
1037 "%s: rtls_send: need_sched", mac_name(rtlsp->mh)); in rtls_send()
1062 mac_name(rtlsp->mh), tx_status); in rtls_send()
1087 mac_name(rtlsp->mh), tx_status); in rtls_send()
1119 mac_name(rtlsp->mh), totlen); in rtls_send()
1230 mac_name(rtlsp->mh)); in rtls_receive()
[all …]
/titanic_41/usr/src/uts/common/io/dld/
H A Ddld_drv.c431 mac_handle_t mh = NULL; in drv_ioc_hwgrpget() local
442 err = mac_open_by_linkid(hwgrpp->dih_linkid, &mh); in drv_ioc_hwgrpget()
450 rgrpnum = mac_hwgrp_num(mh, MAC_RING_TYPE_RX); in drv_ioc_hwgrpget()
459 bcopy(mac_name(mh), hwgrp.dhi_link_name, in drv_ioc_hwgrpget()
461 mac_get_hwrxgrp_info(mh, 0, &hwgrp.dhi_grp_num, in drv_ioc_hwgrpget()
475 tgrpnum = mac_hwgrp_num(mh, MAC_RING_TYPE_TX); in drv_ioc_hwgrpget()
484 bcopy(mac_name(mh), hwgrp.dhi_link_name, in drv_ioc_hwgrpget()
486 mac_get_hwtxgrp_info(mh, tgrpnum - 1, &hwgrp.dhi_grp_num, in drv_ioc_hwgrpget()
508 bcopy(mac_name(mh), hwgrp.dhi_link_name, in drv_ioc_hwgrpget()
510 mac_get_hwrxgrp_info(mh, i, &hwgrp.dhi_grp_num, in drv_ioc_hwgrpget()
[all …]
/titanic_41/usr/src/uts/common/io/bpf/
H A Dbpf.c250 uintptr_t mh; in bpf_attachd() local
259 mh = 0; in bpf_attachd()
263 error = MBPF_OPEN(bpr, ifname, &mh, zone); in bpf_attachd()
266 error = MBPF_CLIENT_OPEN(bpr, mh, &mcip); in bpf_attachd()
269 error = MBPF_GET_DLT(bpr, mh, &nicdlt); in bpf_attachd()
279 error = MBPF_GET_ZONE(bpr, mh, &niczone); in bpf_attachd()
284 uintptr_t, mh, int, nicdlt, zoneid_t, niczone); in bpf_attachd()
296 if (mh != NULL) { in bpf_attachd()
297 MBPF_CLOSE(bpr, mh); in bpf_attachd()
298 mh = 0; in bpf_attachd()
[all …]
H A Dbpf_mod.c366 mac_handle_t mh; in bpf_provider_tickle() local
368 if (mac_open_by_linkid(id, &mh) == 0) { in bpf_provider_tickle()
369 mac_close(mh); in bpf_provider_tickle()
/titanic_41/usr/src/uts/common/io/dls/
H A Ddls_mgmt.c1273 mac_handle_t mh; in dls_devnet_rename() local
1334 if ((err = mac_open(ddp->dd_mac, &mh)) != 0) in dls_devnet_rename()
1336 (void) mac_rename_primary(mh, link); in dls_devnet_rename()
1337 mac_close(mh); in dls_devnet_rename()
1350 if ((err = mac_open(ddp->dd_mac, &mh)) != 0) in dls_devnet_rename()
1358 mac_close(mh); in dls_devnet_rename()
1364 if ((err = mac_mark_exclusive(mh)) != 0) in dls_devnet_rename()
1372 mac_unmark_exclusive(mh); in dls_devnet_rename()
1379 mac_unmark_exclusive(mh); in dls_devnet_rename()
1390 mac_unmark_exclusive(mh); in dls_devnet_rename()
[all …]
/titanic_41/usr/src/cmd/cmd-inet/usr.sbin/snoop/
H A Dsnoop_ether.c809 struct tr_header *mh; in interpret_tr() local
846 mh = (struct tr_header *)e; in interpret_tr()
847 rh = (struct tr_ri *)&mh->ri; in interpret_tr()
848 fc = mh->fc; in interpret_tr()
859 if (memcmp(&mh->dhost, &ether_broadcast, in interpret_tr()
862 else if (memcmp(&mh->dhost, &tokenbroadcastaddr2, in interpret_tr()
865 else if (mh->dhost.ether_addr_octet[0] & TR_FN_ADDR) in interpret_tr()
871 src_name = print_etherinfo(&mh->shost); in interpret_tr()
872 dst_name = print_etherinfo(&mh->dhost); in interpret_tr()
938 printether(&mh->dhost), in interpret_tr()
[all …]
/titanic_41/usr/src/uts/common/io/aggr/
H A Daggr_port.c135 mac_handle_t mh; in aggr_port_create() local
152 if ((err = mac_open_by_linkid(linkid, &mh)) != 0) in aggr_port_create()
155 mip = mac_info(mh); in aggr_port_create()
166 note = mac_no_notification(mh); in aggr_port_create()
187 if ((err = mac_client_open(mh, &mch, client_name, in aggr_port_create()
202 if ((err = mac_margin_add(mh, &margin, B_TRUE)) != 0) { in aggr_port_create()
209 VERIFY(mac_margin_remove(mh, margin) == 0); in aggr_port_create()
218 port->lp_mh = mh; in aggr_port_create()
264 mac_close(mh); in aggr_port_create()
/titanic_41/usr/src/uts/common/io/hxge/
H A Dhpi_txdma.c278 tdc_mbh_t mh; in hpi_txdma_mbox_config() local
288 mh.value = ml.value = 0; in hpi_txdma_mbox_config()
292 TXDMA_REG_READ64(handle, TDC_MBH, channel, &mh.value); in hpi_txdma_mbox_config()
295 *mbox_addr |= (mh.value << TDC_MBH_ADDR_SHIFT); in hpi_txdma_mbox_config()
302 mh.bits.mbaddr = ((*mbox_addr >> TDC_MBH_ADDR_SHIFT) & in hpi_txdma_mbox_config()
304 TXDMA_REG_WRITE64(handle, TDC_MBH, channel, mh.value); in hpi_txdma_mbox_config()
/titanic_41/usr/src/uts/sun4v/io/
H A Dvsw_phys.c268 if (vswp->mh != NULL) { in vsw_mac_open()
278 if ((rv = mac_open_by_linkname(vswp->physname, &vswp->mh)) != 0) { in vsw_mac_open()
316 if (vswp->mh != NULL) { in vsw_mac_close()
324 mac_close(vswp->mh); in vsw_mac_close()
325 vswp->mh = NULL; in vsw_mac_close()
526 if (vswp->mh == NULL) { in vsw_maccl_open()
552 rv = mac_client_open(vswp->mh, mchp, mac_cl_name, flags); in vsw_maccl_open()
769 mac_unicast_primary_get(vswp->mh, primary_addr); in vsw_set_if_hw_addr()
1268 rv = mac_set_mtu(vswp->mh, mtu, &mtu_orig); in vsw_mac_set_mtu()
1294 note = mac_no_notification(vswp->mh); in vsw_notify_add()
[all …]
H A Dvnet.c596 if (mac_disable(vnetp->mh) != 0) { in vnet_unattach()
657 VERIFY(mac_unregister(vnetp->mh) == 0); in vnet_unattach()
658 vnetp->mh = NULL; in vnet_unattach()
1126 err = mac_register(macp, &vnetp->mh); in vnet_mac_register()
1376 if ((vnetp == NULL) || (vnetp->mh == 0)) { in vnet_rx()
1382 mac_rx_ring(vnetp->mh, ringp->handle, mp, ringp->gen_num); in vnet_rx()
1394 if (vnetp == NULL || vnetp->mh == NULL) { in vnet_tx_update()
1422 mac_tx_ring_update(vnetp->mh, tx_ringp->handle); in vnet_tx_update()
1460 mac_tx_ring_update(vnetp->mh, tx_ringp->handle); in vnet_tx_notify_thread()
1502 if (vnetp == NULL || vnetp->mh == NULL) { in vnet_mtu_update()
[all …]

1234