bnxt_en: Handle no aggregation ring gracefully.
authorMichael Chan <michael.chan@broadcom.com>
Thu, 29 Dec 2016 17:13:43 +0000 (12:13 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Dec 2016 19:37:23 +0000 (14:37 -0500)
commitbdbd1eb59c565c56a74d21076e2ae8706de00ecd
treed0a8bf33f2900c5a7be38ff1ae9e815bfe67b5f0
parent486b5c22ea1d35e00e90dd79a32a9ee530b18915
bnxt_en: Handle no aggregation ring gracefully.

The current code assumes that we will always have at least 2 rx rings, 1
will be used as an aggregation ring for TPA and jumbo page placements.
However, it is possible, especially on a VF, that there is only 1 rx
ring available.  In this scenario, the current code will fail to initialize.
To handle it, we need to properly set up only 1 ring without aggregation.
Set a new flag BNXT_FLAG_NO_AGG_RINGS for this condition and add logic to
set up the chip to place RX data linearly into a single buffer per packet.

Signed-off-by: Michael Chan <michael.chan@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