Lines Matching refs:mailbox
122 struct mlx4_cmd_mailbox *mailbox; in mlx4_set_port_mac_table() local
126 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_set_port_mac_table()
127 if (IS_ERR(mailbox)) in mlx4_set_port_mac_table()
128 return PTR_ERR(mailbox); in mlx4_set_port_mac_table()
130 memcpy(mailbox->buf, entries, MLX4_MAC_TABLE_SIZE); in mlx4_set_port_mac_table()
134 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_set_port_mac_table()
138 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_set_port_mac_table()
339 struct mlx4_cmd_mailbox *mailbox; in mlx4_set_port_vlan_table() local
343 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_set_port_vlan_table()
344 if (IS_ERR(mailbox)) in mlx4_set_port_vlan_table()
345 return PTR_ERR(mailbox); in mlx4_set_port_vlan_table()
347 memcpy(mailbox->buf, entries, MLX4_VLAN_TABLE_SIZE); in mlx4_set_port_vlan_table()
349 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_set_port_vlan_table()
353 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_set_port_vlan_table()
612 int port, struct mlx4_cmd_mailbox *mailbox) in mlx4_reset_roce_port_gids() argument
622 memset(mailbox->buf, 0, MLX4_MAILBOX_SIZE); in mlx4_reset_roce_port_gids()
631 gid_entry_mbox = (struct mlx4_roce_gid_entry *)mailbox->buf; in mlx4_reset_roce_port_gids()
637 err = mlx4_cmd(dev, mailbox->dma, in mlx4_reset_roce_port_gids()
649 struct mlx4_cmd_mailbox *mailbox; in mlx4_reset_roce_gids() local
670 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_reset_roce_gids()
671 if (IS_ERR(mailbox)) in mlx4_reset_roce_gids()
678 err = mlx4_reset_roce_port_gids(dev, slave, i + 1, mailbox); in mlx4_reset_roce_gids()
685 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_reset_roce_gids()
935 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT() local
941 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT()
942 if (IS_ERR(mailbox)) in mlx4_SET_PORT()
943 return PTR_ERR(mailbox); in mlx4_SET_PORT()
945 ((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port]; in mlx4_SET_PORT()
949 ((__be16 *) mailbox->buf)[20] = cpu_to_be16(pkey_tbl_sz); in mlx4_SET_PORT()
954 ((__be32 *) mailbox->buf)[0] = cpu_to_be32( in mlx4_SET_PORT()
960 err = mlx4_cmd(dev, mailbox->dma, port, in mlx4_SET_PORT()
967 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT()
974 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_general() local
979 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_general()
980 if (IS_ERR(mailbox)) in mlx4_SET_PORT_general()
981 return PTR_ERR(mailbox); in mlx4_SET_PORT_general()
982 context = mailbox->buf; in mlx4_SET_PORT_general()
991 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_general()
995 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_general()
1003 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_qpn_calc() local
1013 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_qpn_calc()
1014 if (IS_ERR(mailbox)) in mlx4_SET_PORT_qpn_calc()
1015 return PTR_ERR(mailbox); in mlx4_SET_PORT_qpn_calc()
1016 context = mailbox->buf; in mlx4_SET_PORT_qpn_calc()
1029 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_qpn_calc()
1033 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_qpn_calc()
1040 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_fcs_check() local
1045 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_fcs_check()
1046 if (IS_ERR(mailbox)) in mlx4_SET_PORT_fcs_check()
1047 return PTR_ERR(mailbox); in mlx4_SET_PORT_fcs_check()
1048 context = mailbox->buf; in mlx4_SET_PORT_fcs_check()
1056 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT, in mlx4_SET_PORT_fcs_check()
1059 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_fcs_check()
1083 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_VXLAN() local
1086 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_VXLAN()
1087 if (IS_ERR(mailbox)) in mlx4_SET_PORT_VXLAN()
1088 return PTR_ERR(mailbox); in mlx4_SET_PORT_VXLAN()
1089 context = mailbox->buf; in mlx4_SET_PORT_VXLAN()
1098 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_VXLAN()
1102 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_VXLAN()
1110 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_BEACON() local
1112 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_BEACON()
1113 if (IS_ERR(mailbox)) in mlx4_SET_PORT_BEACON()
1114 return PTR_ERR(mailbox); in mlx4_SET_PORT_BEACON()
1116 *((__be32 *)mailbox->buf) = cpu_to_be32(time); in mlx4_SET_PORT_BEACON()
1118 err = mlx4_cmd(dev, mailbox->dma, port, MLX4_SET_PORT_BEACON_OPCODE, in mlx4_SET_PORT_BEACON()
1122 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_BEACON()