Always return success for RoCE modify port in mlx5ib.

CM layer calls ib_modify_port() regardless of the link layer.

For the Ethernet ports, qkey violation and Port capabilities
are meaningless. Therefore, always return success for ib_modify_port
calls on the Ethernet ports.

Linux Commit:
ec2558796d25e6024071b6bcb8e11392538d57bf

Submitted by:	slavash@
MFC after:	3 days
Sponsored by:	Mellanox Technologies
This commit is contained in:
hselasky 2019-05-08 10:57:16 +00:00
parent 55206dbf77
commit b84ea339a0

View File

@ -1078,6 +1078,14 @@ static int mlx5_ib_modify_port(struct ib_device *ibdev, u8 port, int mask,
u32 tmp;
int err;
/*
* CM layer calls ib_modify_port() regardless of the link
* layer. For Ethernet ports, qkey violation and Port
* capabilities are meaningless.
*/
if (mlx5_ib_port_link_layer(ibdev, port) == IB_LINK_LAYER_ETHERNET)
return 0;
mutex_lock(&dev->cap_mask_mutex);
err = mlx5_ib_query_port(ibdev, port, &attr);