Commit ed5e83a3 authored by Daniel Jurgens's avatar Daniel Jurgens Committed by Saeed Mahameed

net/mlx5: Fix function calculation for page trees

The function calculation always results in a value of 0. This works
generally, but when the release all pages feature is enabled it will
result in crashes.

Fixes: 0aa12847 ("net/mlx5: Maintain separate page trees for ECPF and PF functions")
Signed-off-by: default avatarDaniel Jurgens <danielj@nvidia.com>
Reported-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 188fa104
......@@ -76,7 +76,7 @@ enum {
static u32 get_function(u16 func_id, bool ec_function)
{
return func_id & (ec_function << 16);
return (u32)func_id | (ec_function << 16);
}
static struct rb_root *page_root_per_function(struct mlx5_core_dev *dev, u32 function)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment