Lines Matching refs:mailbox
130 struct mlx4_cmd_mailbox *mailbox; in mlx4_set_port_mac_table() local
134 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_set_port_mac_table()
135 if (IS_ERR(mailbox)) in mlx4_set_port_mac_table()
136 return PTR_ERR(mailbox); in mlx4_set_port_mac_table()
138 memcpy(mailbox->buf, entries, MLX4_MAC_TABLE_SIZE); in mlx4_set_port_mac_table()
142 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_set_port_mac_table()
146 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_set_port_mac_table()
519 struct mlx4_cmd_mailbox *mailbox; in mlx4_set_port_vlan_table() local
523 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_set_port_vlan_table()
524 if (IS_ERR(mailbox)) in mlx4_set_port_vlan_table()
525 return PTR_ERR(mailbox); in mlx4_set_port_vlan_table()
527 memcpy(mailbox->buf, entries, MLX4_VLAN_TABLE_SIZE); in mlx4_set_port_vlan_table()
529 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_set_port_vlan_table()
533 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_set_port_vlan_table()
1150 int port, struct mlx4_cmd_mailbox *mailbox) in mlx4_reset_roce_port_gids() argument
1160 memset(mailbox->buf, 0, MLX4_MAILBOX_SIZE); in mlx4_reset_roce_port_gids()
1169 gid_entry_mbox = (struct mlx4_roce_gid_entry *)mailbox->buf; in mlx4_reset_roce_port_gids()
1175 err = mlx4_cmd(dev, mailbox->dma, in mlx4_reset_roce_port_gids()
1187 struct mlx4_cmd_mailbox *mailbox; in mlx4_reset_roce_gids() local
1208 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_reset_roce_gids()
1209 if (IS_ERR(mailbox)) in mlx4_reset_roce_gids()
1216 err = mlx4_reset_roce_port_gids(dev, slave, i + 1, mailbox); in mlx4_reset_roce_gids()
1223 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_reset_roce_gids()
1550 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT() local
1556 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT()
1557 if (IS_ERR(mailbox)) in mlx4_SET_PORT()
1558 return PTR_ERR(mailbox); in mlx4_SET_PORT()
1560 ((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port]; in mlx4_SET_PORT()
1564 ((__be16 *) mailbox->buf)[20] = cpu_to_be16(pkey_tbl_sz); in mlx4_SET_PORT()
1569 ((__be32 *) mailbox->buf)[0] = cpu_to_be32( in mlx4_SET_PORT()
1575 err = mlx4_cmd(dev, mailbox->dma, port, in mlx4_SET_PORT()
1582 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT()
1591 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_general() local
1596 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_general()
1597 if (IS_ERR(mailbox)) in mlx4_SET_PORT_general()
1598 return PTR_ERR(mailbox); in mlx4_SET_PORT_general()
1599 context = mailbox->buf; in mlx4_SET_PORT_general()
1613 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_general()
1617 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_general()
1625 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_qpn_calc() local
1635 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_qpn_calc()
1636 if (IS_ERR(mailbox)) in mlx4_SET_PORT_qpn_calc()
1637 return PTR_ERR(mailbox); in mlx4_SET_PORT_qpn_calc()
1638 context = mailbox->buf; in mlx4_SET_PORT_qpn_calc()
1651 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_qpn_calc()
1655 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_qpn_calc()
1662 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_user_mtu() local
1667 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_user_mtu()
1668 if (IS_ERR(mailbox)) in mlx4_SET_PORT_user_mtu()
1669 return PTR_ERR(mailbox); in mlx4_SET_PORT_user_mtu()
1670 context = mailbox->buf; in mlx4_SET_PORT_user_mtu()
1675 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_user_mtu()
1679 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_user_mtu()
1686 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_user_mac() local
1691 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_user_mac()
1692 if (IS_ERR(mailbox)) in mlx4_SET_PORT_user_mac()
1693 return PTR_ERR(mailbox); in mlx4_SET_PORT_user_mac()
1694 context = mailbox->buf; in mlx4_SET_PORT_user_mac()
1699 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_user_mac()
1703 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_user_mac()
1710 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_fcs_check() local
1715 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_fcs_check()
1716 if (IS_ERR(mailbox)) in mlx4_SET_PORT_fcs_check()
1717 return PTR_ERR(mailbox); in mlx4_SET_PORT_fcs_check()
1718 context = mailbox->buf; in mlx4_SET_PORT_fcs_check()
1726 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT, in mlx4_SET_PORT_fcs_check()
1729 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_fcs_check()
1753 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_VXLAN() local
1756 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_VXLAN()
1757 if (IS_ERR(mailbox)) in mlx4_SET_PORT_VXLAN()
1758 return PTR_ERR(mailbox); in mlx4_SET_PORT_VXLAN()
1759 context = mailbox->buf; in mlx4_SET_PORT_VXLAN()
1768 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_VXLAN()
1772 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_VXLAN()
1780 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_BEACON() local
1782 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_BEACON()
1783 if (IS_ERR(mailbox)) in mlx4_SET_PORT_BEACON()
1784 return PTR_ERR(mailbox); in mlx4_SET_PORT_BEACON()
1786 *((__be32 *)mailbox->buf) = cpu_to_be32(time); in mlx4_SET_PORT_BEACON()
1788 err = mlx4_cmd(dev, mailbox->dma, port, MLX4_SET_PORT_BEACON_OPCODE, in mlx4_SET_PORT_BEACON()
1792 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_BEACON()