]> 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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Mar 2020 22:06:24 +0000 (15:06 -0700)
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: b7cfdd0e9916 ("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>
drivers/net/ethernet/marvell/mvneta.c

index 98017e7d5dd01623baf25b0147f5000c91bc662c..11babc79dc6cb8aae8250bda4eba3eeadd7229bf 100644 (file)
@@ -3036,11 +3036,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)