]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix VF resource checking.
authorMichael Chan <michael.chan@broadcom.com>
Sat, 14 Oct 2017 01:09:32 +0000 (21:09 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Oct 2017 01:51:51 +0000 (18:51 -0700)
commitdea34351e23cbe6ea5c41da6d1179482a8a8ef7b
treea85748de0c53df6eccf12116d94b181b018d0c8a
parent90ea35b491da3cf193528321febe2b107e65e519
bnxt_en: Fix VF resource checking.

In bnxt_sriov_enable(), we calculate to see if we have enough hardware
resources to enable the requested number of VFs.  The logic to check
for minimum completion rings and statistics contexts is missing.  Add
the required checks so that VF configuration won't fail.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c