linux-hardened/drivers/net/ethernet/broadcom/genet
Petri Gynther 6f5a272c99 net: bcmgenet: rework Rx queue init
In preparation for supporting multiple Rx queues:
1. Move the initialization of priv->num_rx_bds, priv->rx_bds, and
   priv->rx_cbs from bcmgenet_init_rx_ring() to bcmgenet_init_dma()
   since they are not specific to a single Rx queue. Mimics the Tx
   init model where priv->num_tx_bds, priv->tx_bds, and priv->tx_cbs
   are initialized in bcmgenet_init_dma().
2. Program DMA_MBUF_DONE_THRESH = 1 so that future Rx queues Q0-Q15
   will get per-packet Rx interrupt.
3. Group DMA_START_ADDR, RDMA_READ_PTR, RDMA_WRITE_PTR, and DMA_END_ADDR
   initialization together. Mimics the Tx init model.
4. There is 1-to-1 mapping between RxCBs and RxBDs.
   Precalculate RxCB->bd_addr so that it can be used in the future.

Signed-off-by: Petri Gynther <pgynther@google.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-07 22:32:40 -05:00
..
bcmgenet.c net: bcmgenet: rework Rx queue init 2015-03-07 22:32:40 -05:00
bcmgenet.h net: bcmgenet: add GENET_Q16_RX_BD_CNT and hw_params->rx_bds_per_q 2015-03-06 15:13:41 -05:00
bcmgenet_wol.c net: bcmgenet: avoid unbalanced enable_irq_wake calls 2014-10-10 15:39:15 -04:00
bcmmii.c net: bcmgenet: enable driver to work without a device tree 2014-12-08 20:26:59 -05:00
Makefile net: bcmgenet: add Wake-on-LAN support code 2014-07-21 16:04:31 -07:00