]> 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)
commit2b335ebb74a15e199e7563796a893605bb8a3b13
treea85748de0c53df6eccf12116d94b181b018d0c8a
parent726a240122314a8d5cb18a7d017d2400d0b850c0
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