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: 9526435 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 DAA6D60113 for ; Thu, 19 Jan 2017 17:07:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC23728616 for ; Thu, 19 Jan 2017 17:07:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0F6F28628; Thu, 19 Jan 2017 17:07:55 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 3B56628616 for ; Thu, 19 Jan 2017 17:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753488AbdASRHw (ORCPT ); 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 X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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. */