diff options
author | Petri Gynther <pgynther@google.com> | 2014-10-07 20:30:01 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-07 21:08:43 +0400 |
commit | 377421662a1739de5ccb71220a0b10a300addbd8 (patch) | |
tree | 78d161cb1e788649bc9c329c4cc61a6c3db30c8e /drivers/net/ethernet/broadcom/genet/bcmgenet.h | |
parent | fd2ef0ba3071c92ac6272ab22ea3f2b16d88a4eb (diff) | |
download | linux-377421662a1739de5ccb71220a0b10a300addbd8.tar.xz |
net: bcmgenet: fix Tx ring priority programming
GENET MAC has three Tx ring priority registers:
- GENET_x_TDMA_PRIORITY0 for queues 0-5
- GENET_x_TDMA_PRIORITY1 for queues 6-11
- GENET_x_TDMA_PRIORITY2 for queues 12-16
Fix bcmgenet_init_multiq() to program them correctly.
Signed-off-by: Petri Gynther <pgynther@google.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/genet/bcmgenet.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.h b/drivers/net/ethernet/broadcom/genet/bcmgenet.h index 321b1db8c14b..dbf524ea3b19 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.h +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.h @@ -401,6 +401,8 @@ struct bcmgenet_mib_counters { #define DMA_ARBITER_MODE_MASK 0x03 #define DMA_RING_BUF_PRIORITY_MASK 0x1F #define DMA_RING_BUF_PRIORITY_SHIFT 5 +#define DMA_PRIO_REG_INDEX(q) ((q) / 6) +#define DMA_PRIO_REG_SHIFT(q) (((q) % 6) * DMA_RING_BUF_PRIORITY_SHIFT) #define DMA_RATE_ADJ_MASK 0xFF /* Tx/Rx Dma Descriptor common bits*/ |