Lines Matching full:mailbox
180 struct mlx4_cmd_mailbox *mailbox; in mlx4_MOD_STAT_CFG() local
189 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_MOD_STAT_CFG()
190 if (IS_ERR(mailbox)) in mlx4_MOD_STAT_CFG()
191 return PTR_ERR(mailbox); in mlx4_MOD_STAT_CFG()
192 inbox = mailbox->buf; in mlx4_MOD_STAT_CFG()
197 err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_MOD_STAT_CFG, in mlx4_MOD_STAT_CFG()
200 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_MOD_STAT_CFG()
206 struct mlx4_cmd_mailbox *mailbox; in mlx4_QUERY_FUNC() local
221 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_QUERY_FUNC()
222 if (IS_ERR(mailbox)) in mlx4_QUERY_FUNC()
223 return PTR_ERR(mailbox); in mlx4_QUERY_FUNC()
224 outbox = mailbox->buf; in mlx4_QUERY_FUNC()
228 err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, 0, in mlx4_QUERY_FUNC()
255 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_QUERY_FUNC()
542 struct mlx4_cmd_mailbox *mailbox; in mlx4_QUERY_FUNC_CAP() local
555 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_QUERY_FUNC_CAP()
556 if (IS_ERR(mailbox)) in mlx4_QUERY_FUNC_CAP()
557 return PTR_ERR(mailbox); in mlx4_QUERY_FUNC_CAP()
559 err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, op_modifier, in mlx4_QUERY_FUNC_CAP()
565 outbox = mailbox->buf; in mlx4_QUERY_FUNC_CAP()
636 /* Mailbox data from 0x6c and onward should only be treated if in mlx4_QUERY_FUNC_CAP()
718 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_QUERY_FUNC_CAP()
727 struct mlx4_cmd_mailbox *mailbox; in mlx4_QUERY_DEV_CAP() local
832 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_QUERY_DEV_CAP()
833 if (IS_ERR(mailbox)) in mlx4_QUERY_DEV_CAP()
834 return PTR_ERR(mailbox); in mlx4_QUERY_DEV_CAP()
835 outbox = mailbox->buf; in mlx4_QUERY_DEV_CAP()
837 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_DEV_CAP, in mlx4_QUERY_DEV_CAP()
1123 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_QUERY_DEV_CAP()
1185 struct mlx4_cmd_mailbox *mailbox; in mlx4_QUERY_PORT() local
1191 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_QUERY_PORT()
1192 if (IS_ERR(mailbox)) in mlx4_QUERY_PORT()
1193 return PTR_ERR(mailbox); in mlx4_QUERY_PORT()
1194 outbox = mailbox->buf; in mlx4_QUERY_PORT()
1197 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_DEV_CAP, in mlx4_QUERY_PORT()
1226 err = mlx4_cmd_box(dev, 0, mailbox->dma, port, 0, MLX4_CMD_QUERY_PORT, in mlx4_QUERY_PORT()
1260 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_QUERY_PORT()
1487 struct mlx4_cmd_mailbox *mailbox; in mlx4_get_slave_pkey_gid_tbl_len() local
1492 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_get_slave_pkey_gid_tbl_len()
1493 if (IS_ERR(mailbox)) in mlx4_get_slave_pkey_gid_tbl_len()
1494 return PTR_ERR(mailbox); in mlx4_get_slave_pkey_gid_tbl_len()
1496 err = mlx4_cmd_box(dev, 0, mailbox->dma, port, 0, in mlx4_get_slave_pkey_gid_tbl_len()
1502 outbox = mailbox->buf; in mlx4_get_slave_pkey_gid_tbl_len()
1511 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_get_slave_pkey_gid_tbl_len()
1518 struct mlx4_cmd_mailbox *mailbox; in mlx4_map_cmd() local
1527 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_map_cmd()
1528 if (IS_ERR(mailbox)) in mlx4_map_cmd()
1529 return PTR_ERR(mailbox); in mlx4_map_cmd()
1530 pages = mailbox->buf; in mlx4_map_cmd()
1563 err = mlx4_cmd(dev, mailbox->dma, nent, 0, op, in mlx4_map_cmd()
1574 err = mlx4_cmd(dev, mailbox->dma, nent, 0, op, in mlx4_map_cmd()
1593 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_map_cmd()
1619 struct mlx4_cmd_mailbox *mailbox; in mlx4_QUERY_FW() local
1645 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_QUERY_FW()
1646 if (IS_ERR(mailbox)) in mlx4_QUERY_FW()
1647 return PTR_ERR(mailbox); in mlx4_QUERY_FW()
1648 outbox = mailbox->buf; in mlx4_QUERY_FW()
1650 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_FW, in mlx4_QUERY_FW()
1736 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_QUERY_FW()
1802 struct mlx4_cmd_mailbox *mailbox; in mlx4_QUERY_ADAPTER() local
1810 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_QUERY_ADAPTER()
1811 if (IS_ERR(mailbox)) in mlx4_QUERY_ADAPTER()
1812 return PTR_ERR(mailbox); in mlx4_QUERY_ADAPTER()
1813 outbox = mailbox->buf; in mlx4_QUERY_ADAPTER()
1815 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_ADAPTER, in mlx4_QUERY_ADAPTER()
1826 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_QUERY_ADAPTER()
1832 struct mlx4_cmd_mailbox *mailbox; in mlx4_INIT_HCA() local
1893 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_INIT_HCA()
1894 if (IS_ERR(mailbox)) in mlx4_INIT_HCA()
1895 return PTR_ERR(mailbox); in mlx4_INIT_HCA()
1896 inbox = mailbox->buf; in mlx4_INIT_HCA()
1898 *((u8 *) mailbox->buf + INIT_HCA_VERSION_OFFSET) = INIT_HCA_VERSION; in mlx4_INIT_HCA()
1900 *((u8 *) mailbox->buf + INIT_HCA_CACHELINE_SZ_OFFSET) = in mlx4_INIT_HCA()
2055 err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_INIT_HCA, in mlx4_INIT_HCA()
2061 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_INIT_HCA()
2068 struct mlx4_cmd_mailbox *mailbox; in mlx4_QUERY_HCA() local
2085 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_QUERY_HCA()
2086 if (IS_ERR(mailbox)) in mlx4_QUERY_HCA()
2087 return PTR_ERR(mailbox); in mlx4_QUERY_HCA()
2088 outbox = mailbox->buf; in mlx4_QUERY_HCA()
2090 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, in mlx4_QUERY_HCA()
2202 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_QUERY_HCA()
2209 struct mlx4_cmd_mailbox *mailbox; in mlx4_hca_core_clock_update() local
2213 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_hca_core_clock_update()
2214 if (IS_ERR(mailbox)) { in mlx4_hca_core_clock_update()
2215 mlx4_warn(dev, "hca_core_clock mailbox allocation failed\n"); in mlx4_hca_core_clock_update()
2216 return PTR_ERR(mailbox); in mlx4_hca_core_clock_update()
2218 outbox = mailbox->buf; in mlx4_hca_core_clock_update()
2220 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, in mlx4_hca_core_clock_update()
2232 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_hca_core_clock_update()
2295 struct mlx4_cmd_mailbox *mailbox; in mlx4_INIT_PORT() local
2316 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_INIT_PORT()
2317 if (IS_ERR(mailbox)) in mlx4_INIT_PORT()
2318 return PTR_ERR(mailbox); in mlx4_INIT_PORT()
2319 inbox = mailbox->buf; in mlx4_INIT_PORT()
2333 err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_INIT_PORT, in mlx4_INIT_PORT()
2336 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_INIT_PORT()
2426 struct mlx4_cmd_mailbox *mailbox; in mlx4_CONFIG_DEV_set() local
2428 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_CONFIG_DEV_set()
2429 if (IS_ERR(mailbox)) in mlx4_CONFIG_DEV_set()
2430 return PTR_ERR(mailbox); in mlx4_CONFIG_DEV_set()
2432 memcpy(mailbox->buf, config_dev, sizeof(*config_dev)); in mlx4_CONFIG_DEV_set()
2434 err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_CONFIG_DEV, in mlx4_CONFIG_DEV_set()
2437 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_CONFIG_DEV_set()
2444 struct mlx4_cmd_mailbox *mailbox; in mlx4_CONFIG_DEV_get() local
2446 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_CONFIG_DEV_get()
2447 if (IS_ERR(mailbox)) in mlx4_CONFIG_DEV_get()
2448 return PTR_ERR(mailbox); in mlx4_CONFIG_DEV_get()
2450 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 1, MLX4_CMD_CONFIG_DEV, in mlx4_CONFIG_DEV_get()
2454 memcpy(config_dev, mailbox->buf, sizeof(*config_dev)); in mlx4_CONFIG_DEV_get()
2456 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_CONFIG_DEV_get()
2552 struct mlx4_cmd_mailbox *mailbox; in mlx4_virt2phy_port_map() local
2559 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_virt2phy_port_map()
2560 if (IS_ERR(mailbox)) in mlx4_virt2phy_port_map()
2563 v2p = mailbox->buf; in mlx4_virt2phy_port_map()
2567 err = mlx4_cmd(dev, mailbox->dma, 0, in mlx4_virt2phy_port_map()
2571 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_virt2phy_port_map()
2605 struct mlx4_cmd_mailbox *mailbox; in mlx4_query_diag_counters() local
2610 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_query_diag_counters()
2611 if (IS_ERR(mailbox)) in mlx4_query_diag_counters()
2612 return PTR_ERR(mailbox); in mlx4_query_diag_counters()
2614 outbox = mailbox->buf; in mlx4_query_diag_counters()
2616 ret = mlx4_cmd_box(dev, 0, mailbox->dma, port, op_modifier, in mlx4_query_diag_counters()
2632 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_query_diag_counters()
2641 struct mlx4_cmd_mailbox *mailbox; in mlx4_get_phys_port_id() local
2649 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_get_phys_port_id()
2650 if (IS_ERR(mailbox)) in mlx4_get_phys_port_id()
2651 return PTR_ERR(mailbox); in mlx4_get_phys_port_id()
2652 outbox = mailbox->buf; in mlx4_get_phys_port_id()
2656 err = mlx4_cmd_box(dev, 0, mailbox->dma, in_mod, 0x2, in mlx4_get_phys_port_id()
2670 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_get_phys_port_id()
2705 struct mlx4_cmd_mailbox *mailbox; in mlx4_opreq_action() local
2723 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_opreq_action()
2724 if (IS_ERR(mailbox)) { in mlx4_opreq_action()
2725 mlx4_err(dev, "Failed to allocate mailbox for GET_OP_REQ\n"); in mlx4_opreq_action()
2728 outbox = mailbox->buf; in mlx4_opreq_action()
2731 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, in mlx4_opreq_action()
2794 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_opreq_action()
2798 struct mlx4_cmd_mailbox *mailbox) in mlx4_check_smp_firewall_active() argument
2808 MLX4_GET(set_attr_mask, mailbox->buf, in mlx4_check_smp_firewall_active()
2813 MLX4_GET(getresp_attr_mask, mailbox->buf, in mlx4_check_smp_firewall_active()
2818 MLX4_GET(trap_attr_mask, mailbox->buf, in mlx4_check_smp_firewall_active()
2823 MLX4_GET(traprepress_attr_mask, mailbox->buf, in mlx4_check_smp_firewall_active()
2837 struct mlx4_cmd_mailbox *mailbox; in mlx4_config_mad_demux() local
2844 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_config_mad_demux()
2845 if (IS_ERR(mailbox)) { in mlx4_config_mad_demux()
2846 mlx4_warn(dev, "Failed to allocate mailbox for cmd MAD_DEMUX"); in mlx4_config_mad_demux()
2851 err = mlx4_cmd_box(dev, 0, mailbox->dma, 0x01 /* subn mgmt class */, in mlx4_config_mad_demux()
2860 if (mlx4_check_smp_firewall_active(dev, mailbox)) in mlx4_config_mad_demux()
2864 err = mlx4_cmd(dev, mailbox->dma, 0x01 /* subn mgmt class */, in mlx4_config_mad_demux()
2875 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_config_mad_demux()
3023 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_phv_bit() local
3028 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_phv_bit()
3029 if (IS_ERR(mailbox)) in mlx4_SET_PORT_phv_bit()
3030 return PTR_ERR(mailbox); in mlx4_SET_PORT_phv_bit()
3031 context = mailbox->buf; in mlx4_SET_PORT_phv_bit()
3038 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_phv_bit()
3042 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_phv_bit()