From: Jisheng Zhang Date: Mon, 16 Mar 2020 14:56:36 +0000 (+0800) Subject: net: mvneta: Fix the case where the last poll did not process all rx X-Git-Tag: Ubuntu-4.15.0-97.98~109 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c8e855fdfa2c368742885d68889e361c6b738361;p=mirror_ubuntu-bionic-kernel.git net: mvneta: Fix the case where the last poll did not process all rx 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kamal Mostafa Signed-off-by: Khalid Elmously --- diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index d6f1b12713eb..855a37916ddd 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -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)