Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1356323ybg; Fri, 18 Oct 2019 16:37:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0FbJJQJLMQcOXmVNoG0n6JSZh+NCGb/LvTsXudxMZKhuLiWLWTjqxouQ32DqYo+YDCZj9 X-Received: by 2002:aa7:d04b:: with SMTP id n11mr12732613edo.104.1571441834040; Fri, 18 Oct 2019 16:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571441834; cv=none; d=google.com; s=arc-20160816; b=Bote4GHuKP9OAfcX6i9ubnn/lFRnbsyVn6GGKASrixchW6RbuLvpIN079QAsw+nY2O R0aDB7wCi2Vfof/7u+JJwl7iMvNTLQzW+cd4YNJ7Wm5tZcBH2eJXuzBay5Z0yxiwgRGc IwJ6YMFwaHr+poH7/QRGlZijj6GQiWT1IPVbfFdviDWb1DrCDgkQ6QQncis75bNZjW0i HN8g4ko/Y/rjXozpnk0HhURzveW01wSqetunJQ403Fv/q8byxOji8glcwU9JkIQqhoPe HX41TK/NSZL6kRWVPFecq/FJoayXLhU++wQIimB55mt6nqlySv5W6sbzC2MT/9y9cm31 fNPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=4c7xFvmef5lRxrkQgjz23Uf2NyIfsBSYqdbKpPR7lx4=; b=IVKGlUdxqhTTYZMuqVoentjlOlIf/qQroM/z1dTvL5UHPIXGyQ6lXHNmdYJMo/Ara3 /NSIZMm5N0UGpt2cZL7LRQBwZ/FfI9ltnuPeS0pPiISUg4i+lKE3UHzIK9U+jdFPquwl ITAzY9IJA0n41i2Exf518zuGtpOe/aJhxyncT96FKdypYYPFx7m/CIxveeahI1BF3CRV +3F8P1geDlNcR6uuoyc6f1BmpaM9sT1Ms0H0pvx03tv76untmXAXCdLvFDaXNwL88nB2 MK8NqwJqJ3Q0/fKmccxAC3vGdJf8xf18psFuPgMIbMwjwuAW9Ur2qTFnvK+dqxY3pu0N NMVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10si4274916ejc.424.2019.10.18.16.36.51; Fri, 18 Oct 2019 16:37:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504483AbfJRHKl convert rfc822-to-8bit (ORCPT + 99 others); Fri, 18 Oct 2019 03:10:41 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:37422 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730051AbfJRHKl (ORCPT ); Fri, 18 Oct 2019 03:10:41 -0400 Received: from mail-pl1-f198.google.com ([209.85.214.198]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iLMPG-0003cJ-7d for linux-kernel@vger.kernel.org; Fri, 18 Oct 2019 07:10:38 +0000 Received: by mail-pl1-f198.google.com with SMTP id x8so3152222plr.23 for ; Fri, 18 Oct 2019 00:10:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=W2dlHKbXpBlBRqZecHK0TxY8GIHXGyTK/jVPgPNEMCI=; b=qgfEoy6cYLfkkher1RQig87mTAW8ELFKRWLJfprw6tT88CWSyqjZn57tadtGQnTBkC ak7FWqeZ6EVLrPVtQBleN9rJkW2P48JG0LZIc8RGm+sPDdIkQpSNpZklYyrdWYo8B+Tn LAFJYJ3BtxgPSUtrssATeNA2asLQFn0zbpYzt08sGlZfLkihgb7Li71hwULf9Qorah2S vqSK9zHew6Ml9QBRpoUgsaMMmDReGN3LWDl7ca4oOQV/z4ijS54+sTIeSMzi6oer9pro 3n0nxnyYW/EOR8xMMAikrfE6ERqxVbYjx2FdL7WXbPiA27nRupiLP/QKwSH8qVuL6CPo Z/yQ== X-Gm-Message-State: APjAAAV8A8HGgnwnQCk1zf2DIfdDBwH9tHNBaPUBWLk67rEDT4DDFw3d 3kcSgbGHCOasCEwFud1003reIRVpOQtC8sTbpAHkOSWqah/eJnqI2tJW2Quq59QANuNWh43BWyy wBPjbwUu4lGPWUprxw6oq+ydga+ivVR+IkI9thsSooA== X-Received: by 2002:a17:90a:5898:: with SMTP id j24mr9259403pji.7.1571382636942; Fri, 18 Oct 2019 00:10:36 -0700 (PDT) X-Received: by 2002:a17:90a:5898:: with SMTP id j24mr9259375pji.7.1571382636614; Fri, 18 Oct 2019 00:10:36 -0700 (PDT) Received: from 2001-b011-380f-3c42-80b6-0157-ba58-fc96.dynamic-ip6.hinet.net (2001-b011-380f-3c42-80b6-0157-ba58-fc96.dynamic-ip6.hinet.net. [2001:b011:380f:3c42:80b6:157:ba58:fc96]) by smtp.gmail.com with ESMTPSA id y17sm8331705pfo.171.2019.10.18.00.10.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2019 00:10:35 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601\)) Subject: Re: [PATCH v2 2/2] PCI: pciehp: Prevent deadlock on disconnect From: Kai-Heng Feng In-Reply-To: <20190923082832.GD2773@lahna.fi.intel.com> Date: Fri, 18 Oct 2019 15:10:32 +0800 Cc: AceLan Kao , Lukas Wunner , Bjorn Helgaas , "Rafael J. Wysocki" , Keith Busch , Andy Shevchenko , Frederick Lawler , "Gustavo A . R . Silva" , Sinan Kaya , Linux PCI , lkml Content-Transfer-Encoding: 8BIT Message-Id: <0DDD8724-5331-495C-BB20-3754B1E667D3@canonical.com> References: <20190812143133.75319-1-mika.westerberg@linux.intel.com> <20190812143133.75319-2-mika.westerberg@linux.intel.com> <20190923053403.jdjw6ed3sub6iuou@wunner.de> <20190923081237.GB2773@lahna.fi.intel.com> <20190923082832.GD2773@lahna.fi.intel.com> To: Mika Westerberg X-Mailer: Apple Mail (2.3601) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mika, > On Sep 23, 2019, at 16:28, Mika Westerberg wrote: > > On Mon, Sep 23, 2019 at 11:12:42AM +0300, Mika Westerberg wrote: >> Regarding suggestion of unbinding PCI drivers without >> pci_lock_rescan_remove() hold, I haven't looked it too closely but I >> think we need to take that lock anyway because when we are unbinding a >> hotplug driver it is supposed to remove the hierarchy below touching the >> shared structures, possibly concurrently. Unfortunately there is no >> documentation what data pci_lock_rescan_remove() actually protects so >> first one needs to understand that. I think one way to clean up this is >> to use finer grained locking (with documented lock ordering) for PCI bus >> structures that can be accessed simultaneusly by different threads. But >> that is not a simple task. > > Now that I looked more closely, I realized it actually is not supposed > to remove the hierarchy below so indeed it might be possible to do that > without taking pci_lock_rescan_remove(). This series fixes S3 resume hang when native PCIe TBT is connected to TBT dock. Is there going to be a v3 of this series? Anyway, please collect my tested-by tag, Tested-by: Kai-Heng Feng Kai-Heng