Skip to contentSkip to conversation

net: ipa: don't be a hog in gsi_channel_poll()

PATCH Applied Alex Elder 2 participants 2 messages May 15, 2020 – May 16, 2020

Subsystems (3)
lore
Share & tools
lore

Alex Elder

author
#0 lore raw

PATCH 1/1 net: ipa: don't be a hog in gsi_channel_poll()

The iteration count value used in gsi_channel_poll() is intended to limit poll iterations to the budget supplied as an argument. But it's never updated.

Fix this bug by incrementing the count each time through the loop.

---
 drivers/net/ipa/gsi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ipa/gsi.c +1 -0
index b671bea0aa7c..8d9ca1c335e8 100644
@@ -1392,6 +1392,7 @@ static int gsi_channel_poll(struct napi_struct *napi, int budget)
 	while (count < budget) {
 		struct gsi_trans *trans;
 
+		count++;
 		trans = gsi_channel_poll_one(channel);
 		if (!trans)
 			break;
Signature · 1 line
2.20.1