From patchwork Mon Feb 24 03:44:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Tang X-Patchwork-Id: 13987407 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) (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 130731B21BF; Mon, 24 Feb 2025 03:45:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.110 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740368716; cv=none; b=n6jQQQs7Xw2m3TN27z9ErT64COc8Qqqq6lEhpg7SL6lff+2p4k7L5VqCd53nGRHsuvCPv2v91F4XoEd58bOuzdH10lUQZGVAHaEBt/Ek7ZKdXeFoj3P4tKhVDuwfzLcDevUPDWlHie0kOpypC+WqamHrijhsgKxJdpT5yxG+DkQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740368716; c=relaxed/simple; bh=PjVIVURsiTWXN7S/uHQMS2YiaBnO/xXEB3uw33ifyKo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iekrsflH80Eil6N+/sYm2jJ0MLN+b9mUnnDddwzPQIKBpOoahmszdhOqFOQeryujIwAikuxeyIYZRtYytqopXKeXj5Kd5AuZrqeiLia/WEYX7MHdI6IDqodfgOMYNulAd8e5vt5yS2wIDI5GicJiLDNiJNjccxW2GTu0C0B/O/0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=nBl6tJVf; arc=none smtp.client-ip=115.124.30.110 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="nBl6tJVf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1740368706; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=MtQeeh/3PwVb5Y4qvoWpaZCTj/9V1FHfpbzFSWYE6SE=; b=nBl6tJVfK+Qm/zcxnYKXmbzcYjU8Wtu3rYj85gPTMkUbUo2b/umDf4Y/cHBHHq2NcOB0y8ax/kYKy6h+gq6nKXHwjFYUPele31V5oucM9E+w1wcl11iRmDHr5IqIy0pbsVs3SKD6s1z8bPBCDBOg9argdpd93y4Yfg5YzoH3v/g= Received: from localhost(mailfrom:feng.tang@linux.alibaba.com fp:SMTPD_---0WQ1rZgH_1740368704 cluster:ay36) by smtp.aliyun-inc.com; Mon, 24 Feb 2025 11:45:04 +0800 From: Feng Tang To: Bjorn Helgaas , Lukas Wunner , Sathyanarayanan Kuppuswamy , Liguang Zhang , Guanghui Feng , rafael@kernel.org Cc: Markus Elfring , lkp@intel.com, Jonathan Cameron , ilpo.jarvinen@linux.intel.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Feng Tang Subject: [PATCH v3 3/4] PCI/portdrv: Loose the condition check for disabling hotplug interrupts Date: Mon, 24 Feb 2025 11:44:59 +0800 Message-Id: <20250224034500.23024-4-feng.tang@linux.alibaba.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20250224034500.23024-1-feng.tang@linux.alibaba.com> References: <20250224034500.23024-1-feng.tang@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Currently when 'pcie_ports_native' and host's 'native_pcie_hotplug' are both false, kernel will not disable PCIe hotplug interrupts. But as those could be affected by software setup like kernel cmdline parameter, remove the depency over them. Suggested-by: Lukas Wunner Signed-off-by: Feng Tang --- drivers/pci/pcie/portdrv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c index ca4f21dff486..619d06b1b3e8 100644 --- a/drivers/pci/pcie/portdrv.c +++ b/drivers/pci/pcie/portdrv.c @@ -263,9 +263,9 @@ static int get_port_device_capability(struct pci_dev *dev) if (dev->is_hotplug_bridge && (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT || - pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM) && - (pcie_ports_native || host->native_pcie_hotplug)) { - services |= PCIE_PORT_SERVICE_HP; + pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM)) { + if (pcie_ports_native || host->native_pcie_hotplug) + services |= PCIE_PORT_SERVICE_HP; /* * Disable hot-plug interrupts in case they have been enabled