]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: mvneta: Fix the case where the last poll did not process all rx
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>
Mon, 16 Mar 2020 14:56:36 +0000 (22:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:01:34 +0000 (11:01 +0200)
[ Upstream commit 57dbff3e22a45c03ead6f66a1314c1b4bbb10a65 ]

For the case where the last mvneta_poll did not process all
RX packets, we need to xor the pp->cause_rx_tx or port->cause_rx_tx
before claculating the rx_queue.

Fixes: 4b74fb0e3e05 ("net: mvneta: Associate RX queues with each CPU")
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mvneta.c

index 6b1a81df1465c6a8bd10ec5d8867b8ede60f5fd1..a10ae28ebc8aa25f498f471c1a0d7355359dc310 100644 (file)
@@ -2804,11 +2804,10 @@ static int mvneta_poll(struct napi_struct *napi, int budget)
        /* For the case where the last mvneta_poll did not process all
         * RX packets
         */
-       rx_queue = fls(((cause_rx_tx >> 8) & 0xff));
-
        cause_rx_tx |= pp->neta_armada3700 ? pp->cause_rx_tx :
                port->cause_rx_tx;
 
+       rx_queue = fls(((cause_rx_tx >> 8) & 0xff));
        if (rx_queue) {
                rx_queue = rx_queue - 1;
                if (pp->bm_priv)