Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2644632ybl; Mon, 19 Aug 2019 05:29:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvpRd+1h7Je03hFEpbmXNUlPhkavyv2dCpc2vwsQComsTgChiNzLR/l7LW+OnlH4Zwa0Du X-Received: by 2002:a17:902:1105:: with SMTP id d5mr22686842pla.197.1566217770650; Mon, 19 Aug 2019 05:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566217770; cv=none; d=google.com; s=arc-20160816; b=s5zAzbJj+gfTEsStbiUKatwMUz6/ziwEureS7IERRnwl/h00HildCMEJHrTtMCNkJf uqblYTGDIKOJUw3tQRJ2ePDh2jzhpXUMc4JaCXFzH7wAgFWYNm13Tlrha9MXuUvVZPid 6lMmOkmI5cRJOvYwKJKdPbGNopgtupgkAghLJS8zmm4yEgy9ycCg0XsHS4MWRWpOyKoR TCwLgcttFhAJtpdhEypt+Rwm/wrn+FwyJTAyEghDix23qVhXFIuFqOUFLHR4OGp4NvoS xs5Hour71SpzbVi2ODlsPGcDpFAQfIC0xb7A0qd1nMHqPbDmPH7TGsxaGmxhjBbreuC4 RkhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=J+QlXDj03kRs9uiGASFZe7wtH7eaph2X2iuVCuWifYg=; b=HLqBPMTkfjhkmup3xnM1m1CPeusScIG2CcTSTVV66UAnjs66XzQkW9xzV98GT3Ab9s RxpgAqk6MF17/MzrMGCrNHCxldqWzLtcvkGdwWjGjZgbeLhqp/LxXUNiIsm8V3Ihk/0t 6ZmSqhhcSJWIwFyiNl3nPA4VeIVNjjEBBH0iyIzSzylA/89e3mVddVglhQkZasDocaRD 66cHrwq0qE+8vRN/nrHaouaaeVq39A4EmroEvI0yyn6vlSzLQkTbtY4fcfiK9xVy62bt jA80dKJ/hCkBwlnWduLOpkkH6mu6opwZSCwlZHFixe9IsNBCFsK6XELsTIh0/fiCtyf6 GVnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uwi6y+1N; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az8si6806767plb.34.2019.08.19.05.29.15; Mon, 19 Aug 2019 05:29:30 -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; dkim=pass header.i=@kernel.org header.s=default header.b=uwi6y+1N; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727424AbfHSM2X (ORCPT + 99 others); Mon, 19 Aug 2019 08:28:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:59936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727039AbfHSM2W (ORCPT ); Mon, 19 Aug 2019 08:28:22 -0400 Received: from [192.168.1.74] (75-58-59-55.lightspeed.rlghnc.sbcglobal.net [75.58.59.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7CFA220843; Mon, 19 Aug 2019 12:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566217701; bh=4nNTJ7OlbEkrwoSuv0YafH77Uv/FiulB1zmykNGQe9c=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=uwi6y+1Ng4ZNJpaGOwR3PQhkifllhh17EascGCHt7UPDVfIf0ieMo8vOgQ/N0tcZK pf/8djU8zpN1Pz+fGmOQvrF/6H3/G3DvONYC7zaiWx3EPUHZReyO0zpORlLcrtM8j+ sblAfNa2PiKIulpfCl2PLKpXWOlDmn7XuaokeahM= Subject: Re: [PATCH v2 2/2] PCI: pciehp: Prevent deadlock on disconnect To: Mika Westerberg Cc: Bjorn Helgaas , "Rafael J. Wysocki" , Lukas Wunner , Keith Busch , Andy Shevchenko , Frederick Lawler , "Gustavo A . R . Silva" , Kai-Heng Feng , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190812143133.75319-1-mika.westerberg@linux.intel.com> <20190812143133.75319-2-mika.westerberg@linux.intel.com> <20190819085620.GM19908@lahna.fi.intel.com> From: Sinan Kaya Openpgp: preference=signencrypt Autocrypt: addr=okaya@kernel.org; keydata= mQENBFrnOrUBCADGOL0kF21B6ogpOkuYvz6bUjO7NU99PKhXx1MfK/AzK+SFgxJF7dMluoF6 uT47bU7zb7HqACH6itTgSSiJeSoq86jYoq5s4JOyaj0/18Hf3/YBah7AOuwk6LtV3EftQIhw 9vXqCnBwP/nID6PQ685zl3vH68yzF6FVNwbDagxUz/gMiQh7scHvVCjiqkJ+qu/36JgtTYYw 8lGWRcto6gr0eTF8Wd8f81wspmUHGsFdN/xPsZPKMw6/on9oOj3AidcR3P9EdLY4qQyjvcNC V9cL9b5I/Ud9ghPwW4QkM7uhYqQDyh3SwgEFudc+/RsDuxjVlg9CFnGhS0nPXR89SaQZABEB AAG0HVNpbmFuIEtheWEgPG9rYXlhQGtlcm5lbC5vcmc+iQFOBBMBCAA4FiEEYdOlMSE+a7/c ckrQvGF4I+4LAFcFAlztcAoCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQvGF4I+4L AFf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L+s0nPaNMKwv/Xhhm6Y= Message-ID: <3c29d829-0068-7135-ccf8-1a254e1fa253@kernel.org> Date: Mon, 19 Aug 2019 08:28:19 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190819085620.GM19908@lahna.fi.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/19/2019 4:56 AM, Mika Westerberg wrote: >> There are PCI controllers that won't report presence detect correctly, >> but still report link active. > If that's the case then pciehp_card_present() returns false so we call > pciehp_check_link_active() which should work with those controllers. > > What I'm missing here? > You are right. I thought we'd somehow prematurely leave the function. That's not the case.