OSDN Git Service

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)
commit021570793d8cd86cb62ac038c535f4450586b454
treea85748de0c53df6eccf12116d94b181b018d0c8a
parent7ab0760f5178169c4c218852f51646ea90817d7c
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