Don't pass unsupported events to ibcore from mlx5ib.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2018-07-17 09:59:55 +00:00
parent 14a1b9bd3a
commit 62bfa774ae

View File

@ -2381,14 +2381,15 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, void *context,
break;
default:
break;
/* unsupported event */
return;
}
ibev.device = &ibdev->ib_dev;
ibev.element.port_num = port;
if (port < 1 || port > ibdev->num_ports) {
mlx5_ib_warn(ibdev, "warning: event on port %d\n", port);
mlx5_ib_warn(ibdev, "warning: event(%d) on port %d\n", event, port);
return;
}