summaryrefslogtreecommitdiff
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorPetri Gynther <pgynther@google.com>2015-03-07 00:45:00 +0300
committerDavid S. Miller <davem@davemloft.net>2015-03-08 06:32:40 +0300
commit6f5a272c99108d9f8450c454a4baede9e7cc643f (patch)
tree15d42d2a90c8441aceb6efdf950f013c68b6ee39 /net/switchdev/switchdev.c
parentae00ec9548f7020734eef340a5f1d96720551713 (diff)
downloadlinux-6f5a272c99108d9f8450c454a4baede9e7cc643f.tar.xz
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>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions