Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2195311/?format=api
{ "id": 2195311, "url": "http://patchwork.ozlabs.org/api/patches/2195311/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260210181225.3926165-2-cassel@kernel.org/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260210181225.3926165-2-cassel@kernel.org>", "list_archive_url": null, "date": "2026-02-10T18:12:25", "name": "PCI: dwc: ep: Fix regression in dw_pcie_ep_raise_msi_irq()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "b2f46e916fefc3c2f0e5245a752b2950fff58b39", "submitter": { "id": 87751, "url": "http://patchwork.ozlabs.org/api/people/87751/?format=api", "name": "Niklas Cassel", "email": "cassel@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260210181225.3926165-2-cassel@kernel.org/mbox/", "series": [ { "id": 491721, "url": "http://patchwork.ozlabs.org/api/series/491721/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=491721", "date": "2026-02-10T18:12:25", "name": "PCI: dwc: ep: Fix regression in dw_pcie_ep_raise_msi_irq()", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491721/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2195311/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2195311/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-47112-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=Dgm1HRg/;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-47112-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"Dgm1HRg/\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "Received": [ "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f9V6M4n3mz1xtr\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 11 Feb 2026 05:12:59 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 914883012BD6\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 18:12:56 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 802C438A29A;\n\tTue, 10 Feb 2026 18:12:55 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D19532D0CC\n\tfor <linux-pci@vger.kernel.org>; Tue, 10 Feb 2026 18:12:55 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id C2766C19424;\n\tTue, 10 Feb 2026 18:12:52 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1770747175; cv=none;\n b=KFZgokJRvBOafkN3Gq9f96f6HcSwI5JYPrpKlulb6lesv7G+1ExF7pSGjCnC/wB14pOgyvwI1zHwNXSdbXRU5rkgeYb2tvnFihEdAC62FOpt6Dmi6u6c6sj6af4JnjM6PV5NrX7Mt0dMHRJ4XQn+3LCCj8AHoQRRfBr4yCQHhgk=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1770747175; c=relaxed/simple;\n\tbh=NqXhpkLmHxy/mPRBnrbNBV0OuuxfDuYPJUyfMqCPueU=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=ZZVcERafpcjHGD3rHrZR76PErIarAbB7f2/M8VO4bMdN6A7ADEBzRetCHVFQlmGUgvyFNLbB+YOOFgjJO2/TjtIJCSrqWKK0APcuIoITWby9HoJ1CrZv2pHrxCAq7dCefHf3s5ZNXZaHmOA+MwEfjFHmpE75AtyizOmAoAcXQVo=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=Dgm1HRg/; arc=none smtp.client-ip=10.30.226.201", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1770747174;\n\tbh=NqXhpkLmHxy/mPRBnrbNBV0OuuxfDuYPJUyfMqCPueU=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=Dgm1HRg/J/6YDsudEYi+uPpKPonyyBPsYAQSGuQvai22QRNOvIhxA+AUGS1HgczGU\n\t EwTD1BeXVZN+F5IuCKEjKJJRFEVR/30N1zibdar8MAnLr3u80Ezzo3wEp++OKDY8XS\n\t h/Ok+ZDUj2YgDp5GZF4FkElDIn6PQvnAzgyDWFbmDSFm3DIqpKiKNjgoGXzRiBLRxi\n\t 6jtKQ+3BRO01ipVC0fa4T5h9xl7zhlKH9Vp0Zk05ODa57zMMjU5mgG6q5hbaErCQxL\n\t xIuBS5ly/uGVbkTdFFfGuO8cFOFUryoOuchg50NAWxLqGapnC3HfSOgM5drKl76q2Q\n\t H5OUWQ70byHnQ==", "From": "Niklas Cassel <cassel@kernel.org>", "To": "Jingoo Han <jingoohan1@gmail.com>,\n Manivannan Sadhasivam <mani@kernel.org>,\n Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy=C5=84?=\n\t=?utf-8?q?ski?= <kwilczynski@kernel.org>, Rob Herring <robh@kernel.org>,\n Bjorn Helgaas <bhelgaas@google.com>, Koichiro Den <den@valinux.co.jp>,\n Niklas Cassel <cassel@kernel.org>", "Cc": "Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>,\n\tlinux-pci@vger.kernel.org", "Subject": "[PATCH] PCI: dwc: ep: Fix regression in dw_pcie_ep_raise_msi_irq()", "Date": "Tue, 10 Feb 2026 19:12:25 +0100", "Message-ID": "<20260210181225.3926165-2-cassel@kernel.org>", "X-Mailer": "git-send-email 2.53.0", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=3124; i=cassel@kernel.org;\n h=from:subject; bh=NqXhpkLmHxy/mPRBnrbNBV0OuuxfDuYPJUyfMqCPueU=;\n b=owGbwMvMwCV2MsVw8cxjvkWMp9WSGDK7SzmnbhT5yf+44+TMWI/tK5bcn/+U5XX2i4/rA0MPO\n 7s95flt11HKwiDGxSArpsji+8Nlf3G3+5TjindsYOawMoEMYeDiFICJ8Fcx/M9U2MKw8GNx2/V5\n t+RvfJ+2SiaXY4JTwfYVnxM3f/V/6BrHyLBt+ql0s1r9o1P4g06vCTq9WlRE1SQtK/b9/M79y3S\n eb+IHAA==", "X-Developer-Key": "i=cassel@kernel.org; a=openpgp;\n fpr=5ADE635C0E631CBBD5BE065A352FE6582ED9B5DA", "Content-Transfer-Encoding": "8bit" }, "content": "When using the nvmet-pci-epf EPF driver, and starting the EP before\nstarting a host with UEFI, the UEFI performs NVMe commands e.g.\nIdentify Controller, to get the name of the controller.\n\nnvmet-pci-epf will post the CQE (completion queue entry) to the Admin\nCompletion Queue, and then raise an IRQ (using\ndw_pcie_ep_raise_msi_irq()).\n\nOnce the host boots Linux, we will see a WARN_ON_ONCE() from\ndw_pcie_ep_raise_msi_irq(), and then the booting of the host hangs,\nbecause it never gets an IRQ when loading the nvme driver.\n\nThe reason is that the MSI target address used by UEFI and Linux might\nbe different, which will cause dw_pcie_ep_raise_msi_irq() to simply\nreturn -EINVAL.\n\nThis was working before commit 8719c64e76bf (\"PCI: dwc: ep: Cache MSI\noutbound iATU mapping\"), so this is a regression.\n\nAlso, remove the warning, as we cannot know if there are operations in\nflight or not, so it seems wrong to print this warning unconditionally\nat every boot when e.g. nvmet-pci-epf is used with a host with UEFI.\n\nFixes: 8719c64e76bf (\"PCI: dwc: ep: Cache MSI outbound iATU mapping\")\nSigned-off-by: Niklas Cassel <cassel@kernel.org>\n---\n .../pci/controller/dwc/pcie-designware-ep.c | 22 +++++++++++--------\n 1 file changed, 13 insertions(+), 9 deletions(-)\n\n\nbase-commit: 43d324eeb08c3dd9fff7eb9a2c617afd3b96e65c", "diff": "diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c\nindex 7e7844ff0f7e..5d8024d5e5c6 100644\n--- a/drivers/pci/controller/dwc/pcie-designware-ep.c\n+++ b/drivers/pci/controller/dwc/pcie-designware-ep.c\n@@ -896,6 +896,19 @@ int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,\n \t * supported, so we avoid reprogramming the region on every MSI,\n \t * specifically unmapping immediately after writel().\n \t */\n+\tif (ep->msi_iatu_mapped && (ep->msi_msg_addr != msg_addr ||\n+\t\t\t\t ep->msi_map_size != map_size)) {\n+\t\t/*\n+\t\t * The host changed the MSI target address or the required\n+\t\t * mapping size changed. Reprogramming the iATU when there are\n+\t\t * operations in flight is unsafe on this controller. However,\n+\t\t * there is no unified way to check if we have operations in\n+\t\t * flight, thus we don't know if we should WARN() or not.\n+\t\t */\n+\t\tdw_pcie_ep_unmap_addr(epc, func_no, 0, ep->msi_mem_phys);\n+\t\tep->msi_iatu_mapped = false;\n+\t}\n+\n \tif (!ep->msi_iatu_mapped) {\n \t\tret = dw_pcie_ep_map_addr(epc, func_no, 0,\n \t\t\t\t\t ep->msi_mem_phys, msg_addr,\n@@ -906,15 +919,6 @@ int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,\n \t\tep->msi_iatu_mapped = true;\n \t\tep->msi_msg_addr = msg_addr;\n \t\tep->msi_map_size = map_size;\n-\t} else if (WARN_ON_ONCE(ep->msi_msg_addr != msg_addr ||\n-\t\t\t\tep->msi_map_size != map_size)) {\n-\t\t/*\n-\t\t * The host changed the MSI target address or the required\n-\t\t * mapping size changed. Reprogramming the iATU at runtime is\n-\t\t * unsafe on this controller, so bail out instead of trying to\n-\t\t * update the existing region.\n-\t\t */\n-\t\treturn -EINVAL;\n \t}\n \n \twritel(msg_data | (interrupt_num - 1), ep->msi_mem + offset);\n", "prefixes": [] }