mirror of
https://github.com/opnsense/src.git
synced 2026-03-27 05:03:09 -04:00
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
1 changed files with 4 additions and 1 deletions
|
|
@ -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 a new issue