提交 ed5e83a3 编写于 作者: D Daniel Jurgens 提交者: 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: NDaniel Jurgens <danielj@nvidia.com>
Reported-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册