mlx4_core: Don't perform SET_PORT command for Ethernet ports
The same operation is performed when the Ethernet driver initializes the port. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
085343b475
commit
793730bfb6
@ -298,20 +298,17 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port)
|
|||||||
{
|
{
|
||||||
struct mlx4_cmd_mailbox *mailbox;
|
struct mlx4_cmd_mailbox *mailbox;
|
||||||
int err;
|
int err;
|
||||||
u8 is_eth = dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH;
|
|
||||||
|
|
||||||
mailbox = mlx4_alloc_cmd_mailbox(dev);
|
mailbox = mlx4_alloc_cmd_mailbox(dev);
|
||||||
if (IS_ERR(mailbox))
|
if (IS_ERR(mailbox))
|
||||||
return PTR_ERR(mailbox);
|
return PTR_ERR(mailbox);
|
||||||
|
|
||||||
memset(mailbox->buf, 0, 256);
|
memset(mailbox->buf, 0, 256);
|
||||||
if (is_eth) {
|
if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
|
||||||
((u8 *) mailbox->buf)[3] = 6;
|
return 0;
|
||||||
((__be16 *) mailbox->buf)[4] = cpu_to_be16(1 << 15);
|
|
||||||
((__be16 *) mailbox->buf)[6] = cpu_to_be16(1 << 15);
|
((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port];
|
||||||
} else
|
err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_SET_PORT,
|
||||||
((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port];
|
|
||||||
err = mlx4_cmd(dev, mailbox->dma, port, is_eth, MLX4_CMD_SET_PORT,
|
|
||||||
MLX4_CMD_TIME_CLASS_B);
|
MLX4_CMD_TIME_CLASS_B);
|
||||||
|
|
||||||
mlx4_free_cmd_mailbox(dev, mailbox);
|
mlx4_free_cmd_mailbox(dev, mailbox);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user