bnxt_en: Keep track of the ring group resource.
authorMichael Chan <mchan@broadcom.com>
Sun, 27 Dec 2015 23:19:27 +0000 (18:19 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Dec 2015 05:57:28 +0000 (00:57 -0500)
commitb72d4a68c443e29cb59e15a1a9b2c2f4bf802831
tree8f311557800a7044893c019cc3c66f5659b161f3
parent4a21b49b34c01137a67bf0fe185c5d0fff747e4d
bnxt_en: Keep track of the ring group resource.

Newer firmware will return the ring group resource when we call
hwrm_func_qcaps().  To be compatible with older firmware, use the
number of tx rings as the number of ring groups if the older firmware
returns 0.  When determining how many rx rings we can support, take
the ring group resource in account as well in _bnxt_get_max_rings().
Divide and assign the ring groups to VFs.

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