diff options
author | Joao Pinto <Joao.Pinto@synopsys.com> | 2017-03-17 16:11:06 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-21 17:24:01 -0700 |
commit | a8f5102af2a7740a4b3200a27beddf27f23f921a (patch) | |
tree | d4ea2723adb6b53dfe467c65227853a2371e9b1a /drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | |
parent | aff3d9eff84399e433c4aca65a9bb236581bc082 (diff) | |
download | op-kernel-dev-a8f5102af2a7740a4b3200a27beddf27f23f921a.zip op-kernel-dev-a8f5102af2a7740a4b3200a27beddf27f23f921a.tar.gz |
net: stmmac: TX and RX queue priority configuration
This patch adds the configuration of RX and TX queues' priority.
Signed-off-by: Joao Pinto <jpinto@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 37f550a..77b0468 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -182,6 +182,14 @@ static void stmmac_mtl_setup(struct platform_device *pdev, plat->rx_queues_cfg[queue].chan = queue; /* TODO: Dynamic mapping to be included in the future */ + if (of_property_read_u32(q_node, "snps,priority", + &plat->rx_queues_cfg[queue].prio)) { + plat->rx_queues_cfg[queue].prio = 0; + plat->rx_queues_cfg[queue].use_prio = false; + } else { + plat->rx_queues_cfg[queue].use_prio = true; + } + queue++; } @@ -235,6 +243,14 @@ static void stmmac_mtl_setup(struct platform_device *pdev, plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; } + if (of_property_read_u32(q_node, "snps,priority", + &plat->tx_queues_cfg[queue].prio)) { + plat->tx_queues_cfg[queue].prio = 0; + plat->tx_queues_cfg[queue].use_prio = false; + } else { + plat->tx_queues_cfg[queue].use_prio = true; + } + queue++; } |