From patchwork Sun Jun 28 20:37:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo-Fu Tseng X-Patchwork-Id: 29433 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 2A64CB7139 for ; Fri, 3 Jul 2009 04:46:52 +1000 (EST) Received: by ozlabs.org (Postfix) id 1CF2ADDDA1; Fri, 3 Jul 2009 04:46:52 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id AAB94DDDA0 for ; Fri, 3 Jul 2009 04:46:51 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754047AbZGBSqJ (ORCPT ); Thu, 2 Jul 2009 14:46:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753515AbZGBSqF (ORCPT ); Thu, 2 Jul 2009 14:46:05 -0400 Received: from cooldavid.org ([220.133.139.86]:49289 "EHLO cooldavid.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753557AbZGBSqB (ORCPT ); Thu, 2 Jul 2009 14:46:01 -0400 Received: by cooldavid.org (Postfix, from userid 1000) id D527B5D2D7; Fri, 3 Jul 2009 02:32:23 +0800 (CST) From: Guo-Fu Tseng Date: Mon, 29 Jun 2009 04:37:30 +0800 Subject: [PATCH net-2.6 2/7] jme: Fix unmatched tasklet_{enable|disable} pair To: "David Miller" Cc: "netdev" , "Ethan Hsiao" Message-Id: <20090702183223.D527B5D2D7@cooldavid.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix faulty tasklet function usage. It's kind of silly and critical bug, hopefully it can be applied to 2.6.31. Signed-off-by: Guo-Fu Tseng --- drivers/net/jme.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/jme.c b/drivers/net/jme.c index abf82cd..8de3940 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c @@ -1566,6 +1566,7 @@ jme_open(struct net_device *netdev) jme_clear_pm(jme); JME_NAPI_ENABLE(jme); + tasklet_enable(&jme->linkch_task); tasklet_enable(&jme->txclean_task); tasklet_hi_enable(&jme->rxclean_task); tasklet_hi_enable(&jme->rxempty_task); @@ -1647,10 +1648,10 @@ jme_close(struct net_device *netdev) JME_NAPI_DISABLE(jme); - tasklet_kill(&jme->linkch_task); - tasklet_kill(&jme->txclean_task); - tasklet_kill(&jme->rxclean_task); - tasklet_kill(&jme->rxempty_task); + tasklet_disable(&jme->linkch_task); + tasklet_disable(&jme->txclean_task); + tasklet_disable(&jme->rxclean_task); + tasklet_disable(&jme->rxempty_task); jme_reset_ghc_speed(jme); jme_disable_rx_engine(jme); @@ -2768,6 +2769,7 @@ jme_init_one(struct pci_dev *pdev, tasklet_init(&jme->rxempty_task, &jme_rx_empty_tasklet, (unsigned long) jme); + tasklet_disable_nosync(&jme->linkch_task); tasklet_disable_nosync(&jme->txclean_task); tasklet_disable_nosync(&jme->rxclean_task); tasklet_disable_nosync(&jme->rxempty_task);