]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 7 Apr 2020 08:52:35 +0000 (10:52 +0200)
BugLink: https://bugs.launchpad.net/bugs/1870604
[ Upstream commit 065fd83e1be2e1ba0d446a257fd86a3cc7bddb51 ]

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: 2dcf75e2793c ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/marvell/mvneta.c

index d6f1b12713ebf765cc80d2b1c882c8180704c592..855a37916dddf6888660b762c061880e165c89fe 100644 (file)
@@ -2759,11 +2759,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)