From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EBC52264FB6; Tue, 8 Apr 2025 12:06:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744113994; cv=none; b=SoFo68olGXsXpKttOII6eREmLGQUIBTw1hrJRD+cYnhBroz/aGhiS2mfJYJT9rLmK425YqlqeVdNvvVomI0FaoY6BnzC//dtCmWU4qqsRSp26M2iUNflF/WlWprLrgvSllxZ1+5dmDDygQyr+FDich/PJXV9BBy3FggpNe9/qfc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744113994; c=relaxed/simple; bh=6FgvZ+Rv57akdE7GQmLh51zcsamnDKMG4gWHG6+EZ28=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aUKLx+ZHXmis9J6q9tZ7fdBlaoIEduCRTD/33ooMm2sFzSL7W+C34/WOb/faJL0Mzjqr9GMl+FRVXePoq3BzQY0+6gtaqn8Xutunvb1AP3e0lNIjrfncV1fKFHtzV8M/sbGKA8RQ0wT2CkGWHH/b2VMum3AB2HGxg01s1VMtifo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sonZqHBO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sonZqHBO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 739E2C4CEE5; Tue, 8 Apr 2025 12:06:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744113993; bh=6FgvZ+Rv57akdE7GQmLh51zcsamnDKMG4gWHG6+EZ28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sonZqHBOAr83tqtFhpviynUfSjJQast+7eB159h1yS8ezUe44E/kyKx8RuEmOZqYY SmzItxKiFsRiIHM6EiFRrIEcEiREWCK7CT1ZzThrMHbWb2d2PFs6RZabjo18l74p+g +uHlYJ8LI0bi7H9p+UFRN0CKX8zFTT9nQ/0OJkSU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Bjorn Helgaas , Lukas Wunner , Sasha Levin Subject: [PATCH 5.4 097/154] PCI: pciehp: Dont enable HPIE when resuming in poll mode Date: Tue, 8 Apr 2025 12:50:38 +0200 Message-ID: <20250408104818.433972692@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104815.295196624@linuxfoundation.org> References: <20250408104815.295196624@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ilpo Järvinen [ Upstream commit 527664f738afb6f2c58022cd35e63801e5dc7aec ] PCIe hotplug can operate in poll mode without interrupt handlers using a polling kthread only. eb34da60edee ("PCI: pciehp: Disable hotplug interrupt during suspend") failed to consider that and enables HPIE (Hot-Plug Interrupt Enable) unconditionally when resuming the Port. Only set HPIE if non-poll mode is in use. This makes pcie_enable_interrupt() match how pcie_enable_notification() already handles HPIE. Link: https://lore.kernel.org/r/20250321162114.3939-1-ilpo.jarvinen@linux.intel.com Fixes: eb34da60edee ("PCI: pciehp: Disable hotplug interrupt during suspend") Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Lukas Wunner Signed-off-by: Sasha Levin --- drivers/pci/hotplug/pciehp_hpc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index bdbe01d4d9e90..c3512a0e5b14c 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -765,7 +765,9 @@ void pcie_enable_interrupt(struct controller *ctrl) { u16 mask; - mask = PCI_EXP_SLTCTL_HPIE | PCI_EXP_SLTCTL_DLLSCE; + mask = PCI_EXP_SLTCTL_DLLSCE; + if (!pciehp_poll_mode) + mask |= PCI_EXP_SLTCTL_HPIE; pcie_write_cmd(ctrl, mask, mask); } -- 2.39.5