aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/brocade/bna/bna_hw_defs.h
diff options
context:
space:
mode:
authorRasesh Mody <rmody@brocade.com>2013-12-17 20:07:35 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-18 00:30:33 -0500
commite29aa33912dd71b1446e01d6d7a1b95d0e81f996 (patch)
treec8c3982ad0f174525e00aeaaf3e13ccd6c27496a /drivers/net/ethernet/brocade/bna/bna_hw_defs.h
parentfe1624cfb1286a1dff072daca96678e1111068f4 (diff)
bna: Enable Multi Buffer RX
The CT2 HW supports multi-buffer Rx. This patch provides the necessary changes for bnad to use multi-buffer Rx feature. For BNAD, multi-buffer Rx is by default enabled when MTU is > 4096. For >4096 MTU, q0 data/large buffers are of 2048 size. As the resource requirements of multi-buffer Rx are different new Rx needs to be created to use this feature. ASIC posts multiple completions if frame exceeds buffer size. The last completion is marked with EOP flag. - Separate HQ and DQ enums for resource allocations and configurations. - rx_config and rxq structure changes to pass the correct info from bnad. - DQ depth need not be same as HQ depth. So CQ depth is adjusted accordingly. - Rx CFG frame size is taken from configured MTU. - Rx q0 buffer size is configured from bnad s rx_config when multi-buffer is enabled. - Poll for entire frame completion. - Once EOP completion is received gather the number of vectors used by the frame to submit it to the stack. - Changed MTU to frame size wherever necessary. Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/brocade/bna/bna_hw_defs.h')
-rw-r--r--drivers/net/ethernet/brocade/bna/bna_hw_defs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bna_hw_defs.h b/drivers/net/ethernet/brocade/bna/bna_hw_defs.h
index af3f7bb0b3b8..2702d02e98d9 100644
--- a/drivers/net/ethernet/brocade/bna/bna_hw_defs.h
+++ b/drivers/net/ethernet/brocade/bna/bna_hw_defs.h
@@ -322,6 +322,10 @@ do { \
322#define BNA_CQ_EF_REMOTE (1 << 19) 322#define BNA_CQ_EF_REMOTE (1 << 19)
323 323
324#define BNA_CQ_EF_LOCAL (1 << 20) 324#define BNA_CQ_EF_LOCAL (1 << 20)
325/* CAT2 ASIC does not use bit 21 as per the SPEC.
326 * Bit 31 is set in every end of frame completion
327 */
328#define BNA_CQ_EF_EOP (1 << 31)
325 329
326/* Data structures */ 330/* Data structures */
327 331