From patchwork Wed Nov 5 13:03:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mugunthan V N X-Patchwork-Id: 406985 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 5B0D41400A0 for ; Thu, 6 Nov 2014 00:03:39 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754334AbaKENDf (ORCPT ); Wed, 5 Nov 2014 08:03:35 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:40269 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754035AbaKENDd (ORCPT ); Wed, 5 Nov 2014 08:03:33 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id sA5D3WOD006986; Wed, 5 Nov 2014 07:03:32 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA5D3WHT009053; Wed, 5 Nov 2014 07:03:32 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Wed, 5 Nov 2014 07:03:32 -0600 Received: from mugunthan-lt.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA5D3URe013831; Wed, 5 Nov 2014 07:03:30 -0600 From: Mugunthan V N To: CC: , Mugunthan V N Subject: [net PATCH 1/1] drivers: net: cpsw: remove cpsw_ale_stop from cpsw_ale_destroy Date: Wed, 5 Nov 2014 18:33:31 +0530 Message-ID: <1415192611-22722-1-git-send-email-mugunthanvnm@ti.com> X-Mailer: git-send-email 2.1.2.484.g13da0fc MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org when cpsw is build as modulea and simple insert and removal of module creates a deadlock, due to delete timer. the timer is created and destroyed in cpsw_ale_start and cpsw_ale_stop which are from device open and close. root@am437x-evm:~# modprobe -r ti_cpsw [ 158.505333] INFO: trying to register non-static key. [ 158.510623] the code is fine but needs lockdep annotation. [ 158.516448] turning off the locking correctness validator. [ 158.522282] CPU: 0 PID: 1339 Comm: modprobe Not tainted 3.14.23-00445-gd41c88f #44 [ 158.530359] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 158.538603] [] (show_stack) from [] (dump_stack+0x78/0x94) [ 158.546295] [] (dump_stack) from [] (__lock_acquire+0x176c/0x1b74) [ 158.554711] [] (__lock_acquire) from [] (lock_acquire+0x9c/0x104) [ 158.563043] [] (lock_acquire) from [] (del_timer_sync+0x44/0xd8) [ 158.571289] [] (del_timer_sync) from [] (cpsw_ale_destroy+0x10/0x3c [ti_cpsw]) [ 158.580821] [] (cpsw_ale_destroy [ti_cpsw]) from [] (cpsw_remove+0x30/0xa0 [ti_cpsw]) [ 158.591000] [] (cpsw_remove [ti_cpsw]) from [] (platform_drv_remove+0x18/0x1c) [ 158.600527] [] (platform_drv_remove) from [] (__device_release_driver+0x70/0xc8) [ 158.610236] [] (__device_release_driver) from [] (driver_detach+0xb4/0xb8) [ 158.619386] [] (driver_detach) from [] (bus_remove_driver+0x4c/0x90) [ 158.627988] [] (bus_remove_driver) from [] (SyS_delete_module+0x10c/0x198) [ 158.637144] [] (SyS_delete_module) from [] (ret_fast_syscall+0x0/0x48) [ 179.524727] INFO: rcu_sched detected stalls on CPUs/tasks: {} (detected by 0, t=2102 jiffies, g=1487, c=1486, q=6) [ 179.535741] INFO: Stall ended before state dump start Signed-off-by: Mugunthan V N --- drivers/net/ethernet/ti/cpsw_ale.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c index 3ae8387..097ebe7 100644 --- a/drivers/net/ethernet/ti/cpsw_ale.c +++ b/drivers/net/ethernet/ti/cpsw_ale.c @@ -785,7 +785,6 @@ int cpsw_ale_destroy(struct cpsw_ale *ale) { if (!ale) return -EINVAL; - cpsw_ale_stop(ale); cpsw_ale_control_set(ale, 0, ALE_ENABLE, 0); kfree(ale); return 0;