From patchwork Thu Jan 19 16:58:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 91979 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp378220qgi; Thu, 19 Jan 2017 09:07:55 -0800 (PST) X-Received: by 10.84.215.15 with SMTP id k15mr14595360pli.58.1484845675342; Thu, 19 Jan 2017 09:07:55 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6si4057785pla.288.2017.01.19.09.07.55; Thu, 19 Jan 2017 09:07:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753488AbdASRHw (ORCPT + 4 others); Thu, 19 Jan 2017 12:07:52 -0500 Received: from mail-lf0-f47.google.com ([209.85.215.47]:33215 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753512AbdASRHc (ORCPT ); Thu, 19 Jan 2017 12:07:32 -0500 Received: by mail-lf0-f47.google.com with SMTP id k86so41271138lfi.0 for ; Thu, 19 Jan 2017 09:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=69aHUBxHFUJ3TSuN6hso3+YqZW9tXsWKaoyUo1lGnyM=; b=iv1jj/XfAxjUzgmOAsuJsfdvYsdOWGrur17F5DQAqLhlREQ9T4GjMEaIlVa3QF6rPn 80i1e+onMut1nDcTJMQybRjAO+FwBeGbKXvqmQFMDS1Nlbxu2iaq3vTBEZUpYYrdu25h mJA6Fg77RL9TFY6cmoa5gZEbHgbD13KjMdZls= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=69aHUBxHFUJ3TSuN6hso3+YqZW9tXsWKaoyUo1lGnyM=; b=knp7HFaU1zHEhGX1BxXll9rV9Y69++PFd5UQB2tM4mCSjHf3/IuBMVgA7KXhTb3qMk 8SHfQ6dd2PvtbZPu2U1eF2kn92WlFBu5lN5A/lTsuLw5IVRC8/rPyUY9KR1YTOs2hPYp sTE4ahY9ycG/1HRMkXH8YK4mjcbJbaEPjMNe25WDCuXg/pTI/X9xT4r3BKITS4pJHpNj iWHQHjnDbAEyQPByMcJIkpB8aoHlvO870BmwNIaQEns+NosJYIC9IDvxvfdsj/b7dMJX APL4hKQocjFP28D0xKZzEgLoWadqiijIAyQWuqxWKEhuUC1sEvkw5oDpasjaajDE8iJO ZKGg== X-Gm-Message-State: AIkVDXKhTdO86ez0QkcoA6VQO189YNuXqaykSOd3v2gq/+fuSGbNf+PcI5d+eD0BlBVx8S5o X-Received: by 10.25.201.71 with SMTP id z68mr2955820lff.3.1484845112828; Thu, 19 Jan 2017 08:58:32 -0800 (PST) Received: from khorivan.synapse.com ([2001:67c:2e5c:2011:b088:28ef:5680:e1cf]) by smtp.gmail.com with ESMTPSA id r27sm2162942ljd.14.2017.01.19.08.58.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jan 2017 08:58:32 -0800 (PST) From: Ivan Khoronzhuk To: mugunthanvnm@ti.com Cc: grygorii.strashko@ti.com, netdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH v2 2/5] net: ethernet: ti: cpsw: don't disable interrupts in ndo_open Date: Thu, 19 Jan 2017 18:58:24 +0200 Message-Id: <1484845107-30331-3-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484845107-30331-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1484845107-30331-1-git-send-email-ivan.khoronzhuk@linaro.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org No need to disable interrupts if no open devices, they are disabled anyway. Even no need to disable interrupts if some ndev is opened, In this case shared resources are not touched, only parameters of ndev shell, so no reason to disable them also. Removed lines have proved it. So, no need in redundant check and interrupt disable. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 2 -- 1 file changed, 2 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 296ddf2..f798905 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1480,8 +1480,6 @@ static int cpsw_ndo_open(struct net_device *ndev) return ret; } - if (!cpsw_common_res_usage_state(cpsw)) - cpsw_intr_disable(cpsw); netif_carrier_off(ndev); /* Notify the stack of the actual queue counts. */