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()
539 struct mlx4_cmd_mailbox *mailbox; in mlx4_set_port_vlan_table() local
543 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_set_port_vlan_table()
544 if (IS_ERR(mailbox)) in mlx4_set_port_vlan_table()
545 return PTR_ERR(mailbox); in mlx4_set_port_vlan_table()
547 memcpy(mailbox->buf, entries, MLX4_VLAN_TABLE_SIZE); in mlx4_set_port_vlan_table()
549 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_set_port_vlan_table()
553 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_set_port_vlan_table()
1170 int port, struct mlx4_cmd_mailbox *mailbox) in mlx4_reset_roce_port_gids() argument
1180 memset(mailbox->buf, 0, MLX4_MAILBOX_SIZE); in mlx4_reset_roce_port_gids()
1189 gid_entry_mbox = (struct mlx4_roce_gid_entry *)mailbox->buf; in mlx4_reset_roce_port_gids()
1195 err = mlx4_cmd(dev, mailbox->dma, in mlx4_reset_roce_port_gids()
1207 struct mlx4_cmd_mailbox *mailbox; in mlx4_reset_roce_gids() local
1228 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_reset_roce_gids()
1229 if (IS_ERR(mailbox)) in mlx4_reset_roce_gids()
1236 err = mlx4_reset_roce_port_gids(dev, slave, i + 1, mailbox); in mlx4_reset_roce_gids()
1243 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_reset_roce_gids()
1570 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT() local
1576 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT()
1577 if (IS_ERR(mailbox)) in mlx4_SET_PORT()
1578 return PTR_ERR(mailbox); in mlx4_SET_PORT()
1580 ((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port]; in mlx4_SET_PORT()
1584 ((__be16 *) mailbox->buf)[20] = cpu_to_be16(pkey_tbl_sz); in mlx4_SET_PORT()
1589 ((__be32 *) mailbox->buf)[0] = cpu_to_be32( in mlx4_SET_PORT()
1595 err = mlx4_cmd(dev, mailbox->dma, port, in mlx4_SET_PORT()
1602 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT()
1611 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_general() local
1616 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_general()
1617 if (IS_ERR(mailbox)) in mlx4_SET_PORT_general()
1618 return PTR_ERR(mailbox); in mlx4_SET_PORT_general()
1619 context = mailbox->buf; in mlx4_SET_PORT_general()
1633 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_general()
1637 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_general()
1645 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_qpn_calc() local
1655 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_qpn_calc()
1656 if (IS_ERR(mailbox)) in mlx4_SET_PORT_qpn_calc()
1657 return PTR_ERR(mailbox); in mlx4_SET_PORT_qpn_calc()
1658 context = mailbox->buf; in mlx4_SET_PORT_qpn_calc()
1671 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_qpn_calc()
1675 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_qpn_calc()
1682 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_user_mtu() local
1687 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_user_mtu()
1688 if (IS_ERR(mailbox)) in mlx4_SET_PORT_user_mtu()
1689 return PTR_ERR(mailbox); in mlx4_SET_PORT_user_mtu()
1690 context = mailbox->buf; in mlx4_SET_PORT_user_mtu()
1695 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_user_mtu()
1699 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_user_mtu()
1706 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_user_mac() local
1711 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_user_mac()
1712 if (IS_ERR(mailbox)) in mlx4_SET_PORT_user_mac()
1713 return PTR_ERR(mailbox); in mlx4_SET_PORT_user_mac()
1714 context = mailbox->buf; in mlx4_SET_PORT_user_mac()
1719 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_user_mac()
1723 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_user_mac()
1730 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_fcs_check() local
1735 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_fcs_check()
1736 if (IS_ERR(mailbox)) in mlx4_SET_PORT_fcs_check()
1737 return PTR_ERR(mailbox); in mlx4_SET_PORT_fcs_check()
1738 context = mailbox->buf; in mlx4_SET_PORT_fcs_check()
1746 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT, in mlx4_SET_PORT_fcs_check()
1749 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_fcs_check()
1773 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_VXLAN() local
1776 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_VXLAN()
1777 if (IS_ERR(mailbox)) in mlx4_SET_PORT_VXLAN()
1778 return PTR_ERR(mailbox); in mlx4_SET_PORT_VXLAN()
1779 context = mailbox->buf; in mlx4_SET_PORT_VXLAN()
1788 err = mlx4_cmd(dev, mailbox->dma, in_mod, MLX4_SET_PORT_ETH_OPCODE, in mlx4_SET_PORT_VXLAN()
1792 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_VXLAN()
1800 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_PORT_BEACON() local
1802 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_PORT_BEACON()
1803 if (IS_ERR(mailbox)) in mlx4_SET_PORT_BEACON()
1804 return PTR_ERR(mailbox); in mlx4_SET_PORT_BEACON()
1806 *((__be32 *)mailbox->buf) = cpu_to_be32(time); in mlx4_SET_PORT_BEACON()
1808 err = mlx4_cmd(dev, mailbox->dma, port, MLX4_SET_PORT_BEACON_OPCODE, in mlx4_SET_PORT_BEACON()
1812 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_PORT_BEACON()