From patchwork Thu Jun 2 13:14:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 9149963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 903A96074E for ; Thu, 2 Jun 2016 13:15:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8200F26CFB for ; Thu, 2 Jun 2016 13:15:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76B69282F4; Thu, 2 Jun 2016 13:15:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20596282EE for ; Thu, 2 Jun 2016 13:15:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161095AbcFBNPK (ORCPT ); Thu, 2 Jun 2016 09:15:10 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:33286 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161068AbcFBNPG (ORCPT ); Thu, 2 Jun 2016 09:15:06 -0400 Received: by mail-lf0-f42.google.com with SMTP id s64so33763455lfe.0 for ; Thu, 02 Jun 2016 06:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=LRqDCjHMoPk6TXXjCSvDkbZkek2DhGfSXUigMmZ0sxo=; b=NSm/MluBNhQD3mPppFBqFzpX7Ib4OpmUa3FqU7D6hlnF7jl57Wm0dNgGCluAkF9nD/ YUBL10hBj8BHJC9TGq7HX23Zvar8LV3M46TVD0yLM3QLUgOfS7602X7V45rU4IMvB5KT JN/ubGDHDnV1dfSMfU15RNVdTXqOedbhqHQ0c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LRqDCjHMoPk6TXXjCSvDkbZkek2DhGfSXUigMmZ0sxo=; b=VM9hq7414e2Lw6EfAehGEF20Wu0n4H6btcstMdPeLbMFA6OXJbIcGlLQbAk/ZD88j9 5Id9lN6cT6LTiylg7mK9ijv3sEMbelSCTt9At2yQuDwO6RDMi/wz31MQ4NdmBnWlSMf2 fK/mUEteDxzdkleaHwNa9hHQpSEVrLq3u87P66Sq9Cy0NXwzHj8BlY1sWm84i8alZKB2 s/eB096MiO1iRNgMsSkQvxbohSjMNXqvAP0VBJyga/adnq4bPHLcB/m1vKTF4RKpHJd8 ZQoQ0cL79aTgk9y1iXlcxC9luFOlt/LClLIFHOmQpXOT8U+8E0FTMvHmUEywxfixlWwU Y1ig== X-Gm-Message-State: ALyK8tIODtRWQdp7ppoq6F3RypKfunU0CpJ0jtSLXph22lAVSkfZC/mkme96PVAOWICJYU8k X-Received: by 10.25.83.199 with SMTP id h190mr3942895lfb.83.1464873304531; Thu, 02 Jun 2016 06:15:04 -0700 (PDT) Received: from localhost.localdomain ([212.90.63.58]) by smtp.gmail.com with ESMTPSA id e77sm3880466lji.27.2016.06.02.06.15.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Jun 2016 06:15:03 -0700 (PDT) From: Ivan Khoronzhuk To: linux-kernel@vger.kernel.org, mugunthanvnm@ti.com Cc: grygorii.strashko@ti.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH] net: ethernet: ti: cpsw: fix rx-usecs interrupt pacing consistency Date: Thu, 2 Jun 2016 16:14:52 +0300 Message-Id: <1464873292-17011-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The rx-usecs shouldn't be changed while interface down/up. Currently, for instance, if it's set to 100us, after interface down/up it's 500us. It's a hidden bug that can lead to lavish interrupt pacing time increasing while "down/up" up to max value. Steps to reproduce: - set rx-usecs to be 100us - down/up interface - read new unexpected rx-usecs Signed-off-by: Ivan Khoronzhuk Reviewed-by: Grygorii Strashko --- Based on ti-linux-4.4.y drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 7b44587..9919cb3 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1352,7 +1352,7 @@ static int cpsw_ndo_open(struct net_device *ndev) if (priv->coal_intvl != 0) { struct ethtool_coalesce coal; - coal.rx_coalesce_usecs = (priv->coal_intvl << 4); + coal.rx_coalesce_usecs = priv->coal_intvl; cpsw_set_coalesce(ndev, &coal); }