From patchwork Wed Oct 2 10:57:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 2974241 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 05659BFF0B for ; Wed, 2 Oct 2013 10:59:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D6A10203B4 for ; Wed, 2 Oct 2013 10:59:01 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 193E7203A8 for ; Wed, 2 Oct 2013 10:58:57 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRK8Q-00065y-R2; Wed, 02 Oct 2013 10:58:27 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRK8E-0004XV-1g; Wed, 02 Oct 2013 10:58:14 +0000 Received: from mail-bk0-x229.google.com ([2a00:1450:4008:c01::229]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRK8A-0004UD-Gt for linux-arm-kernel@lists.infradead.org; Wed, 02 Oct 2013 10:58:11 +0000 Received: by mail-bk0-f41.google.com with SMTP id na10so259220bkb.28 for ; Wed, 02 Oct 2013 03:57:48 -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=zPoyHu+uKMDlQig0X9GD4kWyG07ur0Own49NEFLrmvc=; b=bD9W4vDZXAmMLh0sDKI4hf5dnokCDoHnJMvzjk/UJwHsjw4SzCSFeX7XewO6gCs7S0 7Cq40qN/jAgDuXp2YsjLCRZATkSdG0W7QDniTe6eLWzH3N4Qp0jfPz+bTUf1aEzX+46R cxjertfCIyPrDS7n7bCONZ8xPxsL04ub6Et7CEUZMtPzwirjyPgwHxiXSrJAy98Cldut Ud75EB8mN57NIxTEqPo9lu7OUgDhw9pRHjeHWQzjxvpUPBZGePmqvIjWcrYv++nxnUL6 0dLft7tWHb8gAQ2RToZMU/6Y4yxqD0KaXnOo7pF9O1noyDg150ph6jQQRHRKZQSykc7v Mang== X-Received: by 10.205.87.12 with SMTP id au12mr1285996bkc.34.1380711468660; Wed, 02 Oct 2013 03:57:48 -0700 (PDT) Received: from topkick.lan (dslc-082-083-247-252.pools.arcor-ip.net. [82.83.247.252]) by mx.google.com with ESMTPSA id w9sm811190bkn.12.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Oct 2013 03:57:47 -0700 (PDT) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH 1/3] net: mv643xx_eth: update statistics timer from timer context only Date: Wed, 2 Oct 2013 12:57:20 +0200 Message-Id: <1380711442-24735-2-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1380711442-24735-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1380711442-24735-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131002_065810_704630_4B3F3F83 X-CRM114-Status: GOOD ( 10.48 ) X-Spam-Score: -2.0 (--) Cc: Jason Cooper , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Lennert Buytenhek , David Miller , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Each port driver installs a periodic timer to update port statistics by calling mib_counters_update. As mib_counters_update is also called from non-timer context, we should not reschedule the timer there but rather move it to timer-only context. Signed-off-by: Sebastian Hesselbarth Acked-by: Jason Cooper --- Cc: David Miller Cc: Lennert Buytenhek Cc: Jason Cooper Cc: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/marvell/mv643xx_eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 7fb5677..44a87e4 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c @@ -1131,15 +1131,13 @@ static void mib_counters_update(struct mv643xx_eth_private *mp) p->rx_discard += rdlp(mp, RX_DISCARD_FRAME_CNT); p->rx_overrun += rdlp(mp, RX_OVERRUN_FRAME_CNT); spin_unlock_bh(&mp->mib_counters_lock); - - mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ); } static void mib_counters_timer_wrapper(unsigned long _mp) { struct mv643xx_eth_private *mp = (void *)_mp; - mib_counters_update(mp); + mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ); }