提交 0b997657 编写于 作者: Y Yuval Shaia 提交者: Roland Dreier

mlx4_core: Check for DPDP violation only when DPDP is not supported

Move check for DPDP out of the loop to make the code more readable.
Signed-off-by: NYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: NRoland Dreier <roland@purestorage.com>
上级 9f35e899
......@@ -171,9 +171,9 @@ int mlx4_check_port_params(struct mlx4_dev *dev,
{
int i;
for (i = 0; i < dev->caps.num_ports - 1; i++) {
if (port_type[i] != port_type[i + 1]) {
if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_DPDP)) {
if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_DPDP)) {
for (i = 0; i < dev->caps.num_ports - 1; i++) {
if (port_type[i] != port_type[i + 1]) {
mlx4_err(dev, "Only same port types supported on this HCA, aborting\n");
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册