Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp882352rdb; Tue, 30 Jan 2024 01:05:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+5Qh2eRbTreHcwK+sf0s3OglwHMNtLjcjWm3Mls6T12XKpImkcpa6CDVkg9gKpvATvnwX X-Received: by 2002:ac8:5a88:0:b0:42a:99fa:ce36 with SMTP id c8-20020ac85a88000000b0042a99face36mr1126204qtc.33.1706605555300; Tue, 30 Jan 2024 01:05:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706605555; cv=pass; d=google.com; s=arc-20160816; b=wQQX6qnvsmblI1JdHLw/swjigQfUIJ/SMRT2ypgv1qfL/jFU3cEx6hdgjn3tEn655C AUj9pSi531+issBTw3zfNCbUYSp8b67Q7tU6ZCwV8LbSAyPkfMzEylWhci0gqienvNqH 4TKYdf7v1FS7hp9PnETGfKOKpUBibddUWenN8BYHLLEKphLFZvag0ZUG1A8Jm0mBzcHk Y9N926GiDv7WSC+LvjB5gUNgTzS2rX3VYsTHXQUGU7EdZAJx58iFtAFPy1OgcHGAMIx9 2tT1Do6ErO9IvLbCxB5fGfujVL5YACoc5T3mp6aAFKSHY9yJy/FibG2+jM4LkYijXXls KFrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=vjtakvY70G3Id+ynUb/AKoj3dsosmWFYfLGhqV8vgI0=; fh=q74P04jWSmqoiA7Jl0YhJHclvbTye8k9rXnMj+XU6iM=; b=LgKSqw887QqJvK9JXXoUpn2dAlPtvd6DE+4RfsDfC3yV2nzCb9/YDmhjQMQHpatghQ c9sNWr80SOX4jZzZY9IbTcBh08Mnezut2XI0ag8+vIvP7KGL+z/q0D1wRhtbFxEZEame LiEfObEDd7F3ZMHY+VMW9zOYqrU29xm8wi1T/bekwHho44TjodDEzUEe/txaTk0GRBzJ DiUcxjQO8Ava7OxMP5u9jS2T0Jyi2jvZ71iC251YamkcQ2gWbJVO2KHN0xbqohqYWJ+3 PqDmznWvkt6CiFqjmvL4i9FA19dEAWsm3OibSc2DPpOFnxyV5KgyyYIOmiVYGecmXPQj GeOA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bQkwIiIq; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-43948-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43948-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 v16-20020a05622a131000b0042a8509f853si3439068qtk.543.2024.01.30.01.05.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 01:05:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43948-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=bQkwIiIq; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-43948-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43948-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 C1C0F1C2459A for ; Tue, 30 Jan 2024 05:26:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31FC626AC7; Tue, 30 Jan 2024 05:26:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bQkwIiIq" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 59CAD381AA; Tue, 30 Jan 2024 05:26:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706592363; cv=none; b=kvme2pA/fH4Ry/i4fkr+fp01sMrHCCPtnEqrEbmIMSoN4D7IFnokZxV5HgbSR1NP8gX1elKomIuXVIn2iSEs7Guol5rhziouXnufg7tXTe1WSOSpu7SK0D1LHpcGMnbkt3LXo/NVE/Fwyi/EORRxnzueufSNzy/nDgAq3QVVmtM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706592363; c=relaxed/simple; bh=vjtakvY70G3Id+ynUb/AKoj3dsosmWFYfLGhqV8vgI0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=InRoqsOToJw3PjSeoF7TS+gv1revckSwudFA7pQSHkkma+8xSp9etFo718At3BA2l0Vw7lVb3hyv6WnSxItT+2f6Ig7ybUag7q3lx6xpVJdVLR0OQBpKLlxRzFiDG542/wpkI1mDGOsKU2szXdJ71Aj0athv+7pRC2JHNhI04QQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bQkwIiIq; arc=none smtp.client-ip=198.175.65.15 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=1706592362; x=1738128362; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=vjtakvY70G3Id+ynUb/AKoj3dsosmWFYfLGhqV8vgI0=; b=bQkwIiIqqtc0n1VB+3EoJ0uEHwg1FKF6lNtznd6Ddw0v4dikGQU5+2nZ 1qdQQbxcpL3DW8OPaHrpoDOyQU26/P0Zmu70LJS9vt0184dmfoosinD9P pk28BQce6/bzySDkE9V13QwoHxTfgsovWjnK+8BJIveS3hjm9NpUs1Wkx khbt3VvVJSg/0YMPCPKQES6dM/Z1AxO3SEQf0A6V6iqtcMh/WujCfBB0w y1/JJDGhmZ10REusa8sa+7Vter6zjyg68/Cbk1azPqncf6Ru4hMVvFL6/ ctNmrn5zARfKdmLseFLfhz8MQlLxmX5LQv+9lMXADQbWCwITPPxzXiyR/ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="3033147" X-IronPort-AV: E=Sophos;i="6.05,707,1701158400"; d="scan'208";a="3033147" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 21:26:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,707,1701158400"; d="scan'208";a="22324254" Received: from zhaohaif-mobl.ccr.corp.intel.com (HELO [10.238.130.190]) ([10.238.130.190]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 21:25:57 -0800 Message-ID: <67f6d362-845a-44d7-b4f5-f7d589bc5300@linux.intel.com> Date: Tue, 30 Jan 2024 13:25:54 +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 Subject: Re: [PATCH v12 1/5] PCI: make pci_dev_is_disconnected() helper public for other drivers To: "Tian, Kevin" , "baolu.lu@linux.intel.com" , "bhelgaas@google.com" , "robin.murphy@arm.com" , "jgg@ziepe.ca" Cc: "dwmw2@infradead.org" , "will@kernel.org" , "lukas@wunner.de" , "Liu, Yi L" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , Haorong Ye References: <20240129034924.817005-1-haifeng.zhao@linux.intel.com> <20240129034924.817005-2-haifeng.zhao@linux.intel.com> From: Ethan Zhao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/29/2024 4:50 PM, Tian, Kevin wrote: >> From: Ethan Zhao >> Sent: Monday, January 29, 2024 11:49 AM >> >> 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 > s/Beside/Unlike/ > >> space access, so is light enough to optimize the normal pure surprise >> removal and safe removal flow. > somehow this paragraph belongs to the patch using it. The 1st paragraph > is sufficient for the reason of exposure. pci_device_is_present() is aleardy exported symbol, why not just use it ? Also try to make it clear, the difference and justification. Thanks, Ethan