Lines Matching refs:mailbox

54 					struct mlx4_cmd_mailbox *mailbox,  in mlx4_QP_FLOW_STEERING_ATTACH()  argument
61 err = mlx4_cmd_imm(dev, mailbox->dma, &imm, size, 0, in mlx4_QP_FLOW_STEERING_ATTACH()
83 struct mlx4_cmd_mailbox *mailbox) in mlx4_READ_ENTRY() argument
85 return mlx4_cmd_box(dev, 0, mailbox->dma, index, 0, MLX4_CMD_READ_MCG, in mlx4_READ_ENTRY()
90 struct mlx4_cmd_mailbox *mailbox) in mlx4_WRITE_ENTRY() argument
92 return mlx4_cmd(dev, mailbox->dma, index, 0, MLX4_CMD_WRITE_MCG, in mlx4_WRITE_ENTRY()
97 struct mlx4_cmd_mailbox *mailbox) in mlx4_WRITE_PROMISC() argument
102 return mlx4_cmd(dev, mailbox->dma, in_mod, 0x1, in mlx4_WRITE_PROMISC()
107 static int mlx4_GID_HASH(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_GID_HASH() argument
113 err = mlx4_cmd_imm(dev, mailbox->dma, &imm, 0, op_mod, in mlx4_GID_HASH()
152 struct mlx4_cmd_mailbox *mailbox; in new_steering_entry() local
194 mailbox = mlx4_alloc_cmd_mailbox(dev); in new_steering_entry()
195 if (IS_ERR(mailbox)) { in new_steering_entry()
199 mgm = mailbox->buf; in new_steering_entry()
201 err = mlx4_READ_ENTRY(dev, index, mailbox); in new_steering_entry()
222 err = mlx4_WRITE_ENTRY(dev, index, mailbox); in new_steering_entry()
225 mlx4_free_cmd_mailbox(dev, mailbox); in new_steering_entry()
334 struct mlx4_cmd_mailbox *mailbox; in promisc_steering_entry() local
343 mailbox = mlx4_alloc_cmd_mailbox(dev); in promisc_steering_entry()
344 if (IS_ERR(mailbox)) in promisc_steering_entry()
346 mgm = mailbox->buf; in promisc_steering_entry()
348 if (mlx4_READ_ENTRY(dev, index, mailbox)) in promisc_steering_entry()
363 mlx4_free_cmd_mailbox(dev, mailbox); in promisc_steering_entry()
422 struct mlx4_cmd_mailbox *mailbox; in add_promisc_qp() local
453 mailbox = mlx4_alloc_cmd_mailbox(dev); in add_promisc_qp()
454 if (IS_ERR(mailbox)) { in add_promisc_qp()
458 mgm = mailbox->buf; in add_promisc_qp()
468 err = mlx4_READ_ENTRY(dev, entry->index, mailbox); in add_promisc_qp()
507 mailbox); in add_promisc_qp()
529 err = mlx4_WRITE_PROMISC(dev, port, steer, mailbox); in add_promisc_qp()
533 mlx4_free_cmd_mailbox(dev, mailbox); in add_promisc_qp()
540 mlx4_free_cmd_mailbox(dev, mailbox); in add_promisc_qp()
553 struct mlx4_cmd_mailbox *mailbox; in remove_promisc_qp() local
582 mailbox = mlx4_alloc_cmd_mailbox(dev); in remove_promisc_qp()
583 if (IS_ERR(mailbox)) { in remove_promisc_qp()
588 mgm = mailbox->buf; in remove_promisc_qp()
594 err = mlx4_WRITE_PROMISC(dev, port, steer, mailbox); in remove_promisc_qp()
621 mailbox); in remove_promisc_qp()
660 mailbox); in remove_promisc_qp()
668 mlx4_free_cmd_mailbox(dev, mailbox); in remove_promisc_qp()
699 struct mlx4_cmd_mailbox *mailbox; in find_entry() local
707 mailbox = mlx4_alloc_cmd_mailbox(dev); in find_entry()
708 if (IS_ERR(mailbox)) in find_entry()
710 mgid = mailbox->buf; in find_entry()
714 err = mlx4_GID_HASH(dev, mailbox, &hash, op_mod); in find_entry()
715 mlx4_free_cmd_mailbox(dev, mailbox); in find_entry()
980 struct mlx4_cmd_mailbox *mailbox; in mlx4_flow_attach() local
985 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_flow_attach()
986 if (IS_ERR(mailbox)) in mlx4_flow_attach()
987 return PTR_ERR(mailbox); in mlx4_flow_attach()
995 trans_rule_ctrl_to_hw(rule, mailbox->buf); in mlx4_flow_attach()
1000 ret = parse_trans_rule(dev, cur, mailbox->buf + size); in mlx4_flow_attach()
1007 ret = mlx4_QP_FLOW_STEERING_ATTACH(dev, mailbox, size >> 2, reg_id); in mlx4_flow_attach()
1031 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_flow_attach()
1109 struct mlx4_cmd_mailbox *mailbox; in mlx4_qp_attach_common() local
1119 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_qp_attach_common()
1120 if (IS_ERR(mailbox)) in mlx4_qp_attach_common()
1121 return PTR_ERR(mailbox); in mlx4_qp_attach_common()
1122 mgm = mailbox->buf; in mlx4_qp_attach_common()
1126 mailbox, &prev, &index); in mlx4_qp_attach_common()
1173 err = mlx4_WRITE_ENTRY(dev, index, mailbox); in mlx4_qp_attach_common()
1180 err = mlx4_READ_ENTRY(dev, prev, mailbox); in mlx4_qp_attach_common()
1186 err = mlx4_WRITE_ENTRY(dev, prev, mailbox); in mlx4_qp_attach_common()
1210 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_qp_attach_common()
1218 struct mlx4_cmd_mailbox *mailbox; in mlx4_qp_detach_common() local
1227 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_qp_detach_common()
1228 if (IS_ERR(mailbox)) in mlx4_qp_detach_common()
1229 return PTR_ERR(mailbox); in mlx4_qp_detach_common()
1230 mgm = mailbox->buf; in mlx4_qp_detach_common()
1235 mailbox, &prev, &index); in mlx4_qp_detach_common()
1275 err = mlx4_WRITE_ENTRY(dev, index, mailbox); in mlx4_qp_detach_common()
1286 err = mlx4_READ_ENTRY(dev, amgm_index, mailbox); in mlx4_qp_detach_common()
1292 err = mlx4_WRITE_ENTRY(dev, index, mailbox); in mlx4_qp_detach_common()
1307 err = mlx4_READ_ENTRY(dev, prev, mailbox); in mlx4_qp_detach_common()
1313 err = mlx4_WRITE_ENTRY(dev, prev, mailbox); in mlx4_qp_detach_common()
1328 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_qp_detach_common()
1339 struct mlx4_cmd_mailbox *mailbox; in mlx4_QP_ATTACH() local
1346 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_QP_ATTACH()
1347 if (IS_ERR(mailbox)) in mlx4_QP_ATTACH()
1348 return PTR_ERR(mailbox); in mlx4_QP_ATTACH()
1350 memcpy(mailbox->buf, gid, 16); in mlx4_QP_ATTACH()
1356 err = mlx4_cmd(dev, mailbox->dma, qpn, attach, in mlx4_QP_ATTACH()
1360 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_QP_ATTACH()