From patchwork Mon Feb 4 11:55:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Khlebnikov X-Patchwork-Id: 2091401 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id C71683FD56 for ; Mon, 4 Feb 2013 12:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754563Ab3BDL4B (ORCPT ); Mon, 4 Feb 2013 06:56:01 -0500 Received: from mail-la0-f52.google.com ([209.85.215.52]:42457 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754504Ab3BDLz7 (ORCPT ); Mon, 4 Feb 2013 06:55:59 -0500 Received: by mail-la0-f52.google.com with SMTP id fs12so4419870lab.25 for ; Mon, 04 Feb 2013 03:55:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=IYMVNg/baEKTHjLVll85Y1eGLIA3TTnWN9ZkUTjKsb4=; b=NtdSSkSO39nCY1q3hG8kyVElT2NK53+pBzJzVJoJAi01bePztZzpbTAQUcDyB9QGqK luIUO9NoF+5ir4uaDEWiqe3r6SbqKXOqrfO55FFYYIsDHABB+V7ftK7rR4rB1cbqnw2O m4EOHXnnSIOONRlKhzOQFoMEZ8uhwcy05/+3ZNZCD8nRKFZLLJ63f46cSBEJ47EKuZDl HL7q/6ZjOCAmzv+p7yhr06qkdiIIBvLdsbmZyOT39/jXG4HXK/i89ab8Mx1752jA5r42 +f1UmDyN0HarQd7XKIFVMpuQHG7Z/CClIs/kKa7kJy0OhrhQpLlDPKpZYgfUCJDKcCPD kDJQ== X-Received: by 10.112.39.1 with SMTP id l1mr8280548lbk.35.1359978956922; Mon, 04 Feb 2013 03:55:56 -0800 (PST) Received: from localhost (swsoft-msk-nat.sw.ru. [195.214.232.10]) by mx.google.com with ESMTPS id gu8sm8878202lab.6.2013.02.04.03.55.55 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:55:56 -0800 (PST) Subject: [PATCH v2 1/7] e1000e: fix pci-device enable-counter balance To: e1000-devel@lists.sourceforge.net, linux-pci@vger.kernel.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org From: Konstantin Khlebnikov Cc: Bruce Allan , Jeff Kirsher Date: Mon, 04 Feb 2013 15:55:54 +0400 Message-ID: <20130204115554.5569.95207.stgit@zurg> In-Reply-To: <20130204115246.5569.85829.stgit@zurg> References: <20130204115246.5569.85829.stgit@zurg> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org This patch removes redundant and unbalanced pci_disable_device() from __e1000_shutdown(). pci_clear_master() is enough, device can go into suspended state with elevated enable_cnt. Bug was introduced in commit 23606cf5d1192c2b17912cb2ef6e62f9b11de133 ("e1000e / PCI / PM: Add basic runtime PM support (rev. 4)") in v2.6.35 Signed-off-by: Konstantin Khlebnikov Cc: Rafael J. Wysocki Cc: e1000-devel@lists.sourceforge.net Cc: Jeff Kirsher Cc: Bruce Allan --- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" 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/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index fbf75fd..49e944f 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -5503,7 +5503,7 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake, */ e1000e_release_hw_control(adapter); - pci_disable_device(pdev); + pci_clear_master(pdev); return 0; }