From patchwork Fri Apr 26 11:30:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mugunthan V N X-Patchwork-Id: 2492951 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id F33ABDF230 for ; Fri, 26 Apr 2013 11:31:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754816Ab3DZLbU (ORCPT ); Fri, 26 Apr 2013 07:31:20 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:44613 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753122Ab3DZLbT (ORCPT ); Fri, 26 Apr 2013 07:31:19 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r3QBV9FE016480; Fri, 26 Apr 2013 06:31:09 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r3QBV9we019284; Fri, 26 Apr 2013 06:31:09 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Fri, 26 Apr 2013 06:31:08 -0500 Received: from psplinux063.india.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r3QBV6Wh021135; Fri, 26 Apr 2013 06:31:07 -0500 From: Mugunthan V N To: CC: , , Mugunthan V N , Sebastian Siewior Subject: [net-next PATCH 1/1] drivers: net: cpsw: fix kernel warn on cpsw irq enable Date: Fri, 26 Apr 2013 17:00:48 +0530 Message-ID: <1366975848-31503-1-git-send-email-mugunthanvnm@ti.com> X-Mailer: git-send-email 1.8.1 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org With the commit id a11fbba from Sebastian Siewior, a kernel warning is generated as below. This warning is generated as the irq_enabled is not initialized for the primary interface and in probe it is initialized for the secondary interface. This patch moves irq_enabled initialization from second interface to primary interface. [ 3.049173] net eth0: phy found : id is : 0x4dd074 [ 3.054552] net eth0: phy found : id is : 0x4dd074 [ 3.070421] ------------[ cut here ]------------ [ 3.075308] WARNING: at kernel/irq/manage.c:437 enable_irq+0x3c/0x74() [ 3.082173] Unbalanced enable for IRQ 56 [ 3.086299] Modules linked in: [ 3.089557] [] (unwind_backtrace+0x0/0xf0) from [] (warn_slowpath_common+0x4c/0x68) [ 3.099450] [] (warn_slowpath_common+0x4c/0x68) from [] (warn_slowpath_fmt+0x30/0x40) [ 3.109521] [] (warn_slowpath_fmt+0x30/0x40) from [] (enable_irq+0x3c/0x74) [ 3.118681] [] (enable_irq+0x3c/0x74) from [] (cpsw_ndo_open+0x61c/0x684) [ 3.127669] [] (cpsw_ndo_open+0x61c/0x684) from [] (__dev_open+0x9c/0xf8) [ 3.136646] [] (__dev_open+0x9c/0xf8) from [] (__dev_change_flags+0x78/0x13c) [ 3.145988] [] (__dev_change_flags+0x78/0x13c) from [] (dev_change_flags+0x10/0x48) [ 3.155884] [] (dev_change_flags+0x10/0x48) from [] (ip_auto_config+0x198/0x111c) [ 3.165592] [] (ip_auto_config+0x198/0x111c) from [] (do_one_initcall+0x34/0x180) [ 3.175309] [] (do_one_initcall+0x34/0x180) from [] (kernel_init_freeable+0xfc/0x1c8) [ 3.185393] [] (kernel_init_freeable+0xfc/0x1c8) from [] (kernel_init+0x8/0xe4) [ 3.194929] [] (kernel_init+0x8/0xe4) from [] (ret_from_fork+0x14/0x24) [ 3.203712] ---[ end trace d6f979da080bc391 ]--- Cc: Sebastian Siewior Signed-off-by: Mugunthan V N --- 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 4e2d224..59c4391 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1633,7 +1633,6 @@ static int cpsw_probe_dual_emac(struct platform_device *pdev, priv_sl2->irqs_table[i] = priv->irqs_table[i]; priv_sl2->num_irqs = priv->num_irqs; } - priv->irq_enabled = true; ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; ndev->netdev_ops = &cpsw_netdev_ops; @@ -1679,6 +1678,7 @@ static int cpsw_probe(struct platform_device *pdev) priv->msg_enable = netif_msg_init(debug_level, CPSW_DEBUG); priv->rx_packet_max = max(rx_packet_max, 128); priv->cpts = devm_kzalloc(&pdev->dev, sizeof(struct cpts), GFP_KERNEL); + priv->irq_enabled = true; if (!ndev) { pr_err("error allocating cpts\n"); goto clean_ndev_ret;