Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp768649rdd; Tue, 9 Jan 2024 21:31:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkC5rSQvp5y4Wv8FTuqd+2F2AZLMKnuEJ/DB1sz3nbJXygawZkYPha88Y7xxx+hgmiCuZg X-Received: by 2002:ac8:5747:0:b0:429:afec:a201 with SMTP id 7-20020ac85747000000b00429afeca201mr746581qtx.67.1704864672924; Tue, 09 Jan 2024 21:31:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704864672; cv=none; d=google.com; s=arc-20160816; b=ciPkXkjtnc4E6zmqm3h1X4RdRy8nsariLNHbot1C8oOyN+sODhbF5Rd9OBb8GZXPcj iHNNCc6oHpEuY3KJ+kH5j6Scw1+mLo6m+3TOphpDV/DnSA7kcIGil1/F+pcAtpJh2EGz j+nGxkXmToO1NsBIaFHOd9kdLPu6piHO2lc42uleiG1MZ48ysJET9ChqaFuHzpHiswYM fh+umMrTUR60OhFeWWwf08doQmgUO6AvPDpck1wG6qLJOl/P87tO+7xNWRxthbeNjqVg hGIStJidHHifQo0T7w0cA7K12TGQI8FiEb9UFboE5jj6qSOYD7/e0AM993g7T6EMDSmI cQJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=JdkJ+NK2W/qWLPTXu6lnKuLiOp6oXo1d3F44ZMYo6Eg=; fh=zw0Oa20iAp3YmN+cf7yM/4gaqNNqI0hGhBN5fNR7xEY=; b=FafGRNP7ajLgLhJdgJQJa/h+u15TSeS0VqGuaunjjpXQa4zn4JN4VwROCP2p4piWyc +Z9las7imUw9mkEqvdijKnUbl1yCB5ha1qiraJFQLOeOTNmGw1/FuIeqyx5mlcOb/b82 ND4dc7t2F7y2hHOY890DMvm8gJ2uPQttIHBdoHNtRB9/Fy0xAIRceaa29x/urbF2J27P Qql2pFOOK7zn6Ndh1SYaHC/RUtu+GqN9eY/WB9LBAyxBYTeQFOzgy3UzjmjRr948B+B4 +1AcDoRJEgdC1qwOTOpieoH99f3mjQ0aXCGjUc6s9GB76TPS+zMZ7u86XAG53KP38rpG GK2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=feGylJ4r; spf=pass (google.com: domain of linux-kernel+bounces-21722-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21722-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b11-20020ac87fcb000000b00429a6f45c37si2524620qtk.802.2024.01.09.21.31.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 21:31:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21722-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=feGylJ4r; spf=pass (google.com: domain of linux-kernel+bounces-21722-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21722-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AAF7A1C23FB4 for ; Wed, 10 Jan 2024 05:31:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C15DDDD5; Wed, 10 Jan 2024 05:31:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="feGylJ4r" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59A6EDDA1; Wed, 10 Jan 2024 05:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704864663; x=1736400663; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=Hj5faYh6SvrBUXVDfagDM590B8t7PvOarGxhZS51nSo=; b=feGylJ4rrvVkKyuzWUzCpNK1GTp8DhfcHG+o9uAfavW0Yi+qROexLxT1 7pZQgxjuIdGUMGNtTVbVJvvywE4SRqZnFUNhtnfIEmcwKc7nRlinPJAgy fUghxhPXF8GOZNjq4HXSuY+wSSvs4M/BY5nRz1f69F2lBa4cnjE0W61aR AezlSs6TN0uNBSpHfXa5cjnvOpeuW1PR1BVrUftXisU7P7UVWhMmfVn5A Qw6b2cti2AUNw5qGJl0CnVAwUTGeKksuxdOhD4BI5Y0YypgK3jWI+lOmU 7pO06Hfhdj9yxgByC4dJYZYLI9zMbKjqeeNmOI4MoFkOC2O3T42PK22n1 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="5161350" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="5161350" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 21:31:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="816230686" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="816230686" Received: from allen-box.sh.intel.com (HELO [10.239.159.127]) ([10.239.159.127]) by orsmga001.jf.intel.com with ESMTP; 09 Jan 2024 21:30:59 -0800 Message-ID: <8250acd8-4013-487d-9b31-102334ff316a@linux.intel.com> Date: Wed, 10 Jan 2024 13:25:46 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: baolu.lu@linux.intel.com, linux-pci@vger.kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v10 3/5] PCI: make pci_dev_is_disconnected() helper public for other drivers Content-Language: en-US To: Ethan Zhao , kevin.tian@intel.com, bhelgaas@google.com, dwmw2@infradead.org, will@kernel.org, robin.murphy@arm.com, lukas@wunner.de References: <20231228170504.720794-1-haifeng.zhao@linux.intel.com> From: Baolu Lu In-Reply-To: <20231228170504.720794-1-haifeng.zhao@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/29/23 1:05 AM, Ethan Zhao wrote: > Make pci_dev_is_disconnected() public so that it can be called from > Intel VT-d driver to quickly fix/workaround the surprise removal > unplug hang issue for those ATS capable devices on PCIe switch downstream > hotplug capable ports. > > Beside pci_device_is_present() function, this one has no config space > space access, so is light enough to optimize the normal pure surprise > removal and safe removal flow. > > Tested-by: Haorong Ye > Signed-off-by: Ethan Zhao > --- > drivers/pci/pci.h | 5 ----- > include/linux/pci.h | 5 +++++ > 2 files changed, 5 insertions(+), 5 deletions(-) This should be moved before PATCH 2/5? Otherwise, PATCH 2/5 couldn't be compiled. Best regards, baolu