From patchwork Thu Jan 30 16:56:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 315411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9C88D2C00A2 for ; Fri, 31 Jan 2014 03:56:08 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751468AbaA3Q4H (ORCPT ); Thu, 30 Jan 2014 11:56:07 -0500 Received: from mail-ob0-f171.google.com ([209.85.214.171]:51047 "EHLO mail-ob0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751154AbaA3Q4G (ORCPT ); Thu, 30 Jan 2014 11:56:06 -0500 Received: by mail-ob0-f171.google.com with SMTP id wp4so3774995obc.16 for ; Thu, 30 Jan 2014 08:56:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ZbubZvEJN9+NcNJheL23nIGgVryTF0L9OdpN2q+zB3s=; b=eUYd58680B/ptkKcSL8W7twCp2iclXTZEoKtQekiyr9NOWX6a/IHVdXUXUAddHYaIt Eug9zYIPBE6EFfVYkCtTbV1wTki78+0s5OcxrQqO5WVACEj1Acu60RuCLQ0/4k0Q7MMQ juczJLgUdhJYk94/I2msgNj7XaN5ZSjU6BUaC04v7zdIvMkeAePdgIlqAMqwQr6X/4ey HO5Q0nek9aj5xVVp81I7s2NlpToe8lP0SKO0IPH24FrbpNmte3jvUSkkliOi8thylKqk ThedLu7e+h5y/WCm+gfBxrZHmbHp3CRBPbLP/rXZrGZwWh8XW1cMi3nTIVLzllWGwaG3 Fw2Q== MIME-Version: 1.0 X-Received: by 10.182.49.166 with SMTP id v6mr12374378obn.13.1391100965908; Thu, 30 Jan 2014 08:56:05 -0800 (PST) Received: by 10.76.153.136 with HTTP; Thu, 30 Jan 2014 08:56:05 -0800 (PST) In-Reply-To: References: <20140130131236.GW18029@intel.com> Date: Thu, 30 Jan 2014 08:56:05 -0800 X-Google-Sender-Auth: 3FWKAk2sSDr_5m2bZZU3rq2M-4Y Message-ID: Subject: Re: Commit ef83b0781a73f (PCI: Remove from bus_list and release resources in pci_release_dev()) broke TBT hotplug From: Yinghai Lu To: Mika Westerberg Cc: "linux-pci@vger.kernel.org" , Bjorn Helgaas , "Rafael J. Wysocki" Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org >> The latest mainline kernel "hangs" when Thunderbolt devices are >> hot-unplugged to the system. I can't see any oops but after hot-unplug I'm >> getting huge amounts of messages like: >> >> [ 352.717001] pci 0000:02:00.0: PME# disabled >> [ 352.717011] pci 0000:02:00.0: PME# disabled >> [ 352.717021] pci 0000:02:00.0: PME# disabled >> [ 352.717032] pci 0000:02:00.0: PME# disabled >> [ 352.717041] pci 0000:02:00.0: PME# disabled >> [ 352.717051] pci 0000:02:00.0: PME# disabled >> [ 352.717061] pci 0000:02:00.0: PME# disabled >> [ 352.717070] pci 0000:02:00.0: PME# disabled >> [ 352.717083] pci 0000:02:00.0: PME# disabled >> [ 352.717094] pci 0000:02:00.0: PME# disabled >> [ 352.717104] pci 0000:02:00.0: PME# disabled >> [ 352.717113] pci 0000:02:00.0: PME# disabled >> [ 352.717124] pci 0000:02:00.0: PME# disabled >> [ 352.717133] pci 0000:02:00.0: PME# disabled >> [ 352.717143] pci 0000:02:00.0: PME# disabled >> [ 352.717153] pci 0000:02:00.0: PME# disabled >> [ 352.717162] pci 0000:02:00.0: PME# disabled > > that mean pci_stop_dev() get called again and again ? please check if attached patch could help. it should prevent possible reattaching driver. --- drivers/pci/remove.c | 1 + 1 file changed, 1 insertion(+) --- drivers/pci/remove.c | 1 + 1 file changed, 1 insertion(+) Index: linux-2.6/drivers/pci/remove.c =================================================================== --- linux-2.6.orig/drivers/pci/remove.c +++ linux-2.6/drivers/pci/remove.c @@ -11,6 +11,7 @@ static void pci_stop_dev(struct pci_dev pci_proc_detach_device(dev); pci_remove_sysfs_dev_files(dev); device_release_driver(&dev->dev); + dev->match_driver = false; dev->is_added = 0; }