From patchwork Tue Sep 22 13:26:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mingyu Li X-Patchwork-Id: 521055 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 30A3D1401AD for ; Tue, 22 Sep 2015 23:31:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Pp7t6v0H; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 8E49028C732; Tue, 22 Sep 2015 15:27:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 900BE28B79B for ; Tue, 22 Sep 2015 15:25:33 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 22 Sep 2015 15:25:09 +0200 (CEST) Received: by padhy16 with SMTP id hy16so9651597pad.1 for ; Tue, 22 Sep 2015 06:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I9uLRbfIFVFyMcx2ZWUAL0kcCZlt7+U+3KYah8rQ340=; b=Pp7t6v0Hk9vAMMNXp8ntFs1vjnP+NmedusaOVNyV16pd96vpttOkFL9PKANbIBqaEq xlDwokEfkhePC81xzxYwOTBzm4qwqW3KoKGPATKEPlHOuVUPdHUlYv3kR3twZZ02Ye00 NJJ6ucRtxR5O05KoPRHq5Nh8P1yIJh06jDCRbWXKK858gNHbnglkwokQLhn7Uv4+5+fg 9IOfU68hVgw69mymQ7SBph/Hdyp0K6RNh/9oMAArPDUzyTIDwRmZt5RLY2Da3tZw0GL0 VqOBZ3HsdWcm9r3ZoVYqKyWoSJk0lHJPQqfdNfJsy82/0anlqpK9m6Abi0MDwfaFZROE WoHw== X-Received: by 10.68.57.175 with SMTP id j15mr16522903pbq.34.1442928383538; Tue, 22 Sep 2015 06:26:23 -0700 (PDT) Received: from localhost.localdomain (f45hc114.RAS.nctu.edu.tw. [140.113.45.114]) by smtp.gmail.com with ESMTPSA id fn10sm2455118pad.11.2015.09.22.06.26.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Sep 2015 06:26:23 -0700 (PDT) From: Michael Lee To: blogic@openwrt.org Date: Tue, 22 Sep 2015 21:26:03 +0800 Message-Id: <1442928363-6219-7-git-send-email-igvtee@gmail.com> X-Mailer: git-send-email 2.3.6 In-Reply-To: <1442928363-6219-1-git-send-email-igvtee@gmail.com> References: <1442928363-6219-1-git-send-email-igvtee@gmail.com> Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH 7/7] ramips: fix for kernel 4.0 napi repoll need return budgets number X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: michael lee Signed-off-by: Michael Lee --- .../linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c index 4b31b56..608b16a 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c @@ -984,8 +984,11 @@ static int fe_poll(struct napi_struct *napi, int budget) if (!tx_again && (rx_done < budget)) { status = fe_reg_r32(FE_REG_FE_INT_STATUS); - if (status & (tx_intr | rx_intr )) + if (status & (tx_intr | rx_intr)) { + /* let napi poll again */ + rx_done = budget; goto poll_again; + } napi_complete(napi); fe_int_enable(tx_intr | rx_intr);