Re: [PATCH v2 net-next 2/8] net: stmicro: configure mtl rx and tx algorithms
From: Joao Pinto <hidden>
Date: 2017-03-09 09:54:13
Às 9:37 AM de 3/9/2017, Niklas Cassel escreveu:
On 03/08/2017 05:48 PM, Joao Pinto wrote:quoted
Às 4:45 PM de 3/8/2017, Niklas Cassel escreveu:quoted
On 03/08/2017 01:22 PM, Joao Pinto wrote:quoted
This patch adds the RX and TX scheduling algorithms programming. It introduces the multiple queues configuration function (stmmac_mtl_configuration) in stmmac_main.
(snip...)
quoted
quoted
quoted
+ stmmac_mac_enable_rx_queues(priv);Hello Joao Since you are now enabling RX queues here, perhaps we should move the enabling of TX queue(s) here as well?Hi Niklas, TX enable operation is different, it is part of the DMA Operation Mode configuration. In a later patch I will be updating the DMA Operation Mode configuration and this op will be placed here. As indicated by David Miller, this patch-set is focused in MAC ops only. DMA focused patch-set will follow after this one gets accepted.Not sure that I agree 100% since: "23.2 Initializing MTL Registers" 1. Program the Tx Scheduling algorithm. (Which you now do in stmmac_mtl_configuration.) [snip] 3. Program the following fields to initialize the mode of operation in the MTL_TxQ0_Operation_Mode a. Transmit Store And Forward (TSF) or Transmit Threshold Control (TTC) in case of threshold mode b. Transmit Queue Enable (TXQEN) to value 2‘b10 to enable Transmit Queue0 c. Transmit Queue Size (TQS) Note that "Initializing DMA" is a separate chapter. However, since you are planning on moving the MTL_TxQ0_Operation_Mode initialization to stmmac_mtl_configuration in a later patch, I don't think that you have to rework this patch just because of this simple remark.
Sorry, I misleaded you. What I was trying to say was that the TX Operation Mode is going to be moved here in a later patch. Thanks for the help.
Nice to see some work done on multiqueues for stmmac :)quoted
Thanks!quoted
quoted
+} + +/** * stmmac_hw_setup - setup mac in a usable state. * @dev : pointer to the device structure. * Description:@@ -1688,9 +1713,9 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp) /* Initialize the MAC Core */ priv->hw->mac->core_init(priv->hw, dev->mtu); - /* Initialize MAC RX Queues */ - if (priv->hw->mac->rx_queue_enable) - stmmac_mac_enable_rx_queues(priv); + /* Initialize MTL*/ + if (priv->synopsys_id >= DWMAC_CORE_4_00) + stmmac_mtl_configuration(priv); ret = priv->hw->mac->rx_ipc(priv->hw); if (!ret) {