Re: [PATCH net-next] net: stmmac: fix broken dma_interrupt handling for multi-queues

2017-12-13 Thread Joao Pinto
Hi Niklas, Às 10:56 PM de 12/7/2017, Niklas Cassel escreveu: > There is nothing that says that number of TX queues == number of RX > queues. E.g. the ARTPEC-6 SoC has 2 TX queues and 1 RX queue. > Yes you are totally right. Our Hardware was configured with 4RX queues and 4TX queues and that

Re: [PATCH net-next] net: stmmac: fix broken dma_interrupt handling for multi-queues

2017-12-13 Thread Joao Pinto
Hi Niklas, Às 10:56 PM de 12/7/2017, Niklas Cassel escreveu: > There is nothing that says that number of TX queues == number of RX > queues. E.g. the ARTPEC-6 SoC has 2 TX queues and 1 RX queue. > Yes you are totally right. Our Hardware was configured with 4RX queues and 4TX queues and that

Re: [PATCH net-next] net: stmmac: fix broken dma_interrupt handling for multi-queues

2017-12-08 Thread David Miller
From: Niklas Cassel Date: Thu, 7 Dec 2017 23:56:10 +0100 > There is nothing that says that number of TX queues == number of RX > queues. E.g. the ARTPEC-6 SoC has 2 TX queues and 1 RX queue. > > This code is obviously wrong: > for (chan = 0; chan < tx_channel_count;

Re: [PATCH net-next] net: stmmac: fix broken dma_interrupt handling for multi-queues

2017-12-08 Thread David Miller
From: Niklas Cassel Date: Thu, 7 Dec 2017 23:56:10 +0100 > There is nothing that says that number of TX queues == number of RX > queues. E.g. the ARTPEC-6 SoC has 2 TX queues and 1 RX queue. > > This code is obviously wrong: > for (chan = 0; chan < tx_channel_count; chan++) { > struct

Re: [PATCH net-next] net: stmmac: fix broken dma_interrupt handling for multi-queues

2017-12-07 Thread Niklas Cassel
On Thu, Dec 07, 2017 at 11:56:10PM +0100, Niklas Cassel wrote: > Since each DMA channel can be used for rx and tx simultaneously, > the current code should probably be rewritten so that napi_struct is > embedded in a new struct stmmac_channel. > That way, stmmac_poll() can call stmmac_tx_clean()

Re: [PATCH net-next] net: stmmac: fix broken dma_interrupt handling for multi-queues

2017-12-07 Thread Niklas Cassel
On Thu, Dec 07, 2017 at 11:56:10PM +0100, Niklas Cassel wrote: > Since each DMA channel can be used for rx and tx simultaneously, > the current code should probably be rewritten so that napi_struct is > embedded in a new struct stmmac_channel. > That way, stmmac_poll() can call stmmac_tx_clean()

[PATCH net-next] net: stmmac: fix broken dma_interrupt handling for multi-queues

2017-12-07 Thread Niklas Cassel
There is nothing that says that number of TX queues == number of RX queues. E.g. the ARTPEC-6 SoC has 2 TX queues and 1 RX queue. This code is obviously wrong: for (chan = 0; chan < tx_channel_count; chan++) { struct stmmac_rx_queue *rx_q = >rx_queue[chan]; priv->rx_queue has size

[PATCH net-next] net: stmmac: fix broken dma_interrupt handling for multi-queues

2017-12-07 Thread Niklas Cassel
There is nothing that says that number of TX queues == number of RX queues. E.g. the ARTPEC-6 SoC has 2 TX queues and 1 RX queue. This code is obviously wrong: for (chan = 0; chan < tx_channel_count; chan++) { struct stmmac_rx_queue *rx_q = >rx_queue[chan]; priv->rx_queue has size