Skip to contentSkip to conversation

Patch "net: nps_enet: Disable interrupts before napi reschedule" has been added to the 4.6-stable tree

PATCH [email protected] 1 participant 1 message Jun 17, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

net: nps_enet: Disable interrupts before napi reschedule

to the 4.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net-nps_enet-disable-interrupts-before-napi-reschedule.patch
and it can be found in the queue-4.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Fri Jun 17 08:34:39 PDT 2016

From: Elad Kanfi <[email protected]>
Date: Thu, 26 May 2016 15:00:06 +0300
Subject: net: nps_enet: Disable interrupts before napi reschedule

From: Elad Kanfi <[email protected]>

[ Upstream commit 86651650d16a359e4142c6a8b0467c87e48c4c94 ]

Since NAPI works by shutting down event interrupts when theres work and turning them on when theres none, the net driver must make sure that interrupts are disabled when it reschedules polling. By calling napi_reschedule, the driver switches to polling mode, therefor there should be no interrupt interference.
Any received packets will be handled in nps_enet_poll by polling the HW indication of received packet until all packets are handled.

---
 drivers/net/ethernet/ezchip/nps_enet.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/ezchip/nps_enet.c +3 -1
@@ -205,8 +205,10 @@ static int nps_enet_poll(struct napi_str
 		 * re-adding ourselves to the poll list.
 		 */
 
-		if (priv->tx_skb && !tx_ctrl_ct)
+		if (priv->tx_skb && !tx_ctrl_ct) {
+			nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, 0);
 			napi_reschedule(napi);
+		}
 	}
 
 	return work_done;

Patches currently in stable-queue which might be from [email protected] are

queue-4.6/net-nps_enet-disable-interrupts-before-napi-reschedule.patch