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: 69163 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp112342qgf; Thu, 2 Jun 2016 06:15:23 -0700 (PDT) X-Received: by 10.66.132.72 with SMTP id os8mr5469735pab.63.1464873323443; Thu, 02 Jun 2016 06:15:23 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id to3si249077pac.1.2016.06.02.06.15.23; Thu, 02 Jun 2016 06:15:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161116AbcFBNPL (ORCPT + 30 others); Thu, 2 Jun 2016 09:15:11 -0400 Received: from mail-lf0-f46.google.com ([209.85.215.46]:34772 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161081AbcFBNPG (ORCPT ); Thu, 2 Jun 2016 09:15:06 -0400 Received: by mail-lf0-f46.google.com with SMTP id k98so33780514lfi.1 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=M+lFdanh59KgEbr5Dx6AEVhKook9qUTLvaHYvI4MD9IOSmx7w+oQqG5QbNX6iO+PDS pBp6JhG2AYMUZ8DfH/8ArLPsedeldeshXSC9q7UuAbqdb1chHCH02knqWe2je1LNKh8a Lnh/qSvfBp041g2Jn2Y5G73943LNjauVeEK3QUiaH41nx+Wrnsa/BtSzzLBFfIunrhpK A4A6JY/A/wU7Gjb1iy9CH2VCliD4/ARfkhEe3MjbmaaemMg/09i+2PtFeKSjWhisYXcz IZKB4040/jaUI3lFhjDZRjS8TLgaEctEGRucx/3oWPHlJMcc4H129jT2H13qcRS6MJ/k sFnQ== X-Gm-Message-State: ALyK8tLmIftS9oVhpqHC7StZjgXSJeRS4bXRm1PiKwXws45wpiEWLh1XZvtpUu3+EfqAsPEh 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Based on ti-linux-4.4.y drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 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); }