Lines Matching refs:mlxp

204 mlxcx_mac_stat_rfc_2863(mlxcx_t *mlxp, mlxcx_port_t *port, uint_t stat,  in mlxcx_mac_stat_rfc_2863()  argument
219 ok = mlxcx_cmd_access_register(mlxp, MLXCX_CMD_ACCESS_REGISTER_READ, in mlxcx_mac_stat_rfc_2863()
261 mlxcx_mac_stat_ieee_802_3(mlxcx_t *mlxp, mlxcx_port_t *port, uint_t stat, in mlxcx_mac_stat_ieee_802_3() argument
276 ok = mlxcx_cmd_access_register(mlxp, MLXCX_CMD_ACCESS_REGISTER_READ, in mlxcx_mac_stat_ieee_802_3()
308 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_stat() local
309 mlxcx_port_t *port = &mlxp->mlx_ports[0]; in mlxcx_mac_stat()
331 ret = mlxcx_mac_stat_rfc_2863(mlxp, port, stat, val); in mlxcx_mac_stat()
338 ret = mlxcx_mac_stat_ieee_802_3(mlxp, port, stat, val); in mlxcx_mac_stat()
355 mlxcx_t *mlxp = arg; in mlxcx_mac_led_set() local
356 mlxcx_port_t *port = &mlxp->mlx_ports[0]; in mlxcx_mac_led_set()
368 if (!mlxcx_cmd_set_port_led(mlxp, port, 0)) { in mlxcx_mac_led_set()
374 if (!mlxcx_cmd_set_port_led(mlxp, port, UINT16_MAX)) { in mlxcx_mac_led_set()
391 mlxcx_t *mlxp = arg; in mlxcx_mac_txr_info() local
394 if (!mlxcx_cmd_query_module_status(mlxp, id, &st, NULL)) in mlxcx_mac_txr_info()
410 mlxcx_t *mlxp = arg; in mlxcx_mac_txr_read() local
449 ok = mlxcx_cmd_access_register(mlxp, in mlxcx_mac_txr_read()
493 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_start() local
494 (void) mlxp; in mlxcx_mac_start()
501 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_stop() local
502 (void) mlxp; in mlxcx_mac_stop()
509 mlxcx_t *mlxp = sq->mlwq_mlx; in mlxcx_mac_ring_tx() local
525 if (mac_vlan_header_info(mlxp->mlx_mac_hdl, mp, &mhi) != 0) { in mlxcx_mac_ring_tx()
555 bcount = mlxcx_buf_bind_or_copy(mlxp, sq, kmp, take, &b); in mlxcx_mac_ring_tx()
571 mlxcx_buf_return_chain(mlxp, b, B_FALSE); in mlxcx_mac_ring_tx()
578 mlxcx_buf_return_chain(mlxp, b, B_FALSE); in mlxcx_mac_ring_tx()
598 ok = mlxcx_sq_add_buffer(mlxp, sq, inline_hdrs, inline_hdrlen, in mlxcx_mac_ring_tx()
621 mlxcx_buf_return_chain(mlxp, b, B_TRUE); in mlxcx_mac_ring_tx()
628 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_setpromisc() local
629 mlxcx_port_t *port = &mlxp->mlx_ports[0]; in mlxcx_mac_setpromisc()
649 if (!mlxcx_cmd_set_flow_table_entry(mlxp, fe)) { in mlxcx_mac_setpromisc()
653 if (!mlxcx_cmd_delete_flow_table_entry(mlxp, fe)) { in mlxcx_mac_setpromisc()
672 for (idx = 0; idx < mlxp->mlx_rx_ngroups; ++idx) { in mlxcx_mac_setpromisc()
673 g = &mlxp->mlx_rx_groups[idx]; in mlxcx_mac_setpromisc()
683 if (!mlxcx_cmd_set_flow_table_entry(mlxp, fe)) { in mlxcx_mac_setpromisc()
687 if (!mlxcx_cmd_delete_flow_table_entry(mlxp, fe)) { in mlxcx_mac_setpromisc()
703 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_multicast() local
704 mlxcx_port_t *port = &mlxp->mlx_ports[0]; in mlxcx_mac_multicast()
705 mlxcx_ring_group_t *g = &mlxp->mlx_rx_groups[0]; in mlxcx_mac_multicast()
711 if (!mlxcx_add_umcast_entry(mlxp, port, g, addr)) { in mlxcx_mac_multicast()
715 if (!mlxcx_remove_umcast_entry(mlxp, port, g, addr)) { in mlxcx_mac_multicast()
728 mlxcx_t *mlxp = g->mlg_mlx; in mlxcx_group_add_mac() local
734 if (!mlxcx_add_umcast_entry(mlxp, port, g, mac_addr)) { in mlxcx_group_add_mac()
747 mlxcx_t *mlxp = g->mlg_mlx; in mlxcx_group_add_vlan() local
757 if (!mlxcx_add_vlan_entry(mlxp, g, tagged, vid)) { in mlxcx_group_add_vlan()
769 mlxcx_t *mlxp = g->mlg_mlx; in mlxcx_group_remove_vlan() local
779 if (!mlxcx_remove_vlan_entry(mlxp, g, tagged, vid)) { in mlxcx_group_remove_vlan()
791 mlxcx_t *mlxp = g->mlg_mlx; in mlxcx_group_remove_mac() local
797 if (!mlxcx_remove_umcast_entry(mlxp, port, g, mac_addr)) { in mlxcx_group_remove_mac()
812 mlxcx_t *mlxp = wq->mlwq_mlx; in mlxcx_mac_ring_start() local
820 !mlxcx_tx_ring_start(mlxp, g, wq)) in mlxcx_mac_ring_start()
823 !mlxcx_rx_ring_start(mlxp, g, wq)) in mlxcx_mac_ring_start()
838 mlxcx_t *mlxp = wq->mlwq_mlx; in mlxcx_mac_ring_stop() local
866 !mlxcx_cmd_stop_rq(mlxp, wq)) { in mlxcx_mac_ring_stop()
872 !mlxcx_cmd_stop_sq(mlxp, wq)) { in mlxcx_mac_ring_stop()
909 mlxcx_buf_return_chain(mlxp, buf, B_FALSE); in mlxcx_mac_ring_stop()
918 mlxcx_buf_destroy(mlxp, buf); in mlxcx_mac_ring_stop()
928 mlxcx_buf_destroy(mlxp, buf); in mlxcx_mac_ring_stop()
946 mlxcx_t *mlxp = g->mlg_mlx; in mlxcx_mac_group_start() local
949 ASSERT(mlxp != NULL); in mlxcx_mac_group_start()
954 if (!mlxcx_rx_group_start(mlxp, g)) in mlxcx_mac_group_start()
964 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_fill_tx_ring() local
973 g = &mlxp->mlx_tx_groups[0]; in mlxcx_mac_fill_tx_ring()
990 mintr->mi_ddi_handle = mlxp->mlx_intr_handles[ in mlxcx_mac_fill_tx_ring()
1000 mlxcx_t *mlxp = cq->mlcq_mlx; in mlxcx_mac_ring_intr_enable() local
1012 mlxcx_arm_cq(mlxp, cq); in mlxcx_mac_ring_intr_enable()
1037 mlxcx_t *mlxp = wq->mlwq_mlx; in mlxcx_mac_ring_rx_poll() local
1046 mp = mlxcx_rx_poll(mlxp, cq, poll_bytes); in mlxcx_mac_ring_rx_poll()
1056 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_fill_rx_ring() local
1064 ASSERT3S(group_index, <, mlxp->mlx_rx_ngroups); in mlxcx_mac_fill_rx_ring()
1066 g = &mlxp->mlx_rx_groups[group_index]; in mlxcx_mac_fill_rx_ring()
1088 mintr->mi_ddi_handle = mlxp->mlx_intr_handles[ in mlxcx_mac_fill_rx_ring()
1098 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_fill_rx_group() local
1105 ASSERT3S(index, <, mlxp->mlx_rx_ngroups); in mlxcx_mac_fill_rx_group()
1106 g = &mlxp->mlx_rx_groups[index]; in mlxcx_mac_fill_rx_group()
1125 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_getcapab() local
1139 cap_rings->mr_rnum = mlxp->mlx_tx_groups[0].mlg_nwqs; in mlxcx_mac_getcapab()
1146 cap_rings->mr_gnum = mlxp->mlx_rx_ngroups; in mlxcx_mac_getcapab()
1147 for (i = 0; i < mlxp->mlx_rx_ngroups; ++i) in mlxcx_mac_getcapab()
1148 n += mlxp->mlx_rx_groups[i].mlg_nwqs; in mlxcx_mac_getcapab()
1161 if (mlxp->mlx_caps->mlc_checksum) { in mlxcx_mac_getcapab()
1196 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_propinfo() local
1197 mlxcx_port_t *port = &mlxp->mlx_ports[0]; in mlxcx_mac_propinfo()
1297 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_setprop() local
1298 mlxcx_port_t *port = &mlxp->mlx_ports[0]; in mlxcx_mac_setprop()
1319 sh = list_head(&mlxp->mlx_buf_shards); in mlxcx_mac_setprop()
1320 for (; sh != NULL; sh = list_next(&mlxp->mlx_buf_shards, sh)) { in mlxcx_mac_setprop()
1336 ret = mac_maxsdu_update(mlxp->mlx_mac_hdl, new_mtu); in mlxcx_mac_setprop()
1340 if (!mlxcx_cmd_modify_nic_vport_ctx(mlxp, port, in mlxcx_mac_setprop()
1343 (void) mac_maxsdu_update(mlxp->mlx_mac_hdl, old_mtu); in mlxcx_mac_setprop()
1347 if (!mlxcx_cmd_set_port_mtu(mlxp, port)) { in mlxcx_mac_setprop()
1349 (void) mac_maxsdu_update(mlxp->mlx_mac_hdl, old_mtu); in mlxcx_mac_setprop()
1377 if (!mlxcx_cmd_modify_port_fec(mlxp, port, cap_fec)) { in mlxcx_mac_setprop()
1398 if (!mlxcx_cmd_modify_port_status(mlxp, port, in mlxcx_mac_setprop()
1400 !mlxcx_cmd_modify_port_status(mlxp, port, in mlxcx_mac_setprop()
1414 mlxcx_t *mlxp = (mlxcx_t *)arg; in mlxcx_mac_getprop() local
1415 mlxcx_port_t *port = &mlxp->mlx_ports[0]; in mlxcx_mac_getprop()
1603 mlxcx_register_mac(mlxcx_t *mlxp) in mlxcx_register_mac() argument
1612 VERIFY3U(mlxp->mlx_nports, ==, 1); in mlxcx_register_mac()
1613 port = &mlxp->mlx_ports[0]; in mlxcx_register_mac()
1618 mac->m_driver = mlxp; in mlxcx_register_mac()
1619 mac->m_dip = mlxp->mlx_dip; in mlxcx_register_mac()
1628 ret = mac_register(mac, &mlxp->mlx_mac_hdl); in mlxcx_register_mac()
1630 mlxcx_warn(mlxp, "mac_register() returned %d", ret); in mlxcx_register_mac()
1636 mlxcx_update_link_state(mlxp, port); in mlxcx_register_mac()