mlx5: Don't give zero number of pages to the firmware.
Can happen when using virtual mlx5_core<N> functions, VFs. MFC after: 1 week Sponsored by: NVIDIA Networking
This commit is contained in:
parent
273bfac08f
commit
95bf70a4bf
@ -509,7 +509,10 @@ int mlx5_satisfy_startup_pages(struct mlx5_core_dev *dev, int boot)
|
||||
mlx5_core_dbg(dev, "requested %d %s pages for func_id 0x%x\n",
|
||||
npages, boot ? "boot" : "init", func_id);
|
||||
|
||||
return give_pages(dev, func_id, npages, 0);
|
||||
if (npages > 0)
|
||||
return give_pages(dev, func_id, npages, 0);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
enum {
|
||||
|
Loading…
Reference in New Issue
Block a user