mirror of https://gitee.com/openkylin/linux.git
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: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
9f35e8995b
commit
0b9976577c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue