From: Bjorn Helgaas <helgaas@kernel.org>
To: Aksh Garg <a-garg7@ti.com>
Cc: linux-pci@vger.kernel.org, jingoohan1@gmail.com, mani@kernel.org,
lpieralisi@kernel.org, kwilczynski@kernel.org, robh@kernel.org,
bhelgaas@google.com, yoshihiro.shimoda.uh@renesas.com,
fancer.lancer@gmail.com, Zhiqiang.Hou@nxp.com,
gustavo.pimentel@synopsys.com, cassel@kernel.org,
linux-kernel@vger.kernel.org, s-vadapalli@ti.com,
danishanwar@ti.com
Subject: Re: [PATCH v3 1/2] PCI: dwc: ep: Fix MSI-X configuration to write to correct physical function
Date: Fri, 6 Mar 2026 12:45:19 -0600 [thread overview]
Message-ID: <20260306184519.GA131984@bhelgaas> (raw)
In-Reply-To: <20260224083817.916782-2-a-garg7@ti.com>
On Tue, Feb 24, 2026 at 02:08:16PM +0530, Aksh Garg wrote:
> The MSI-X configuration code reads from the correct physical function's
> register space using dw_pcie_ep_readw_dbi(), but writes back only to
> PF0 using the old dw_pcie_writew_dbi() helper. This causes incorrect
> MSI-X configuration for other PFs.
>
> Fix this by using dw_pcie_ep_writew_dbi() to write to the correct PF's
> register space, matching the read operation.
Is this another case of using "PF" in a non-SR-IOV context, as I asked
about here?
https://lore.kernel.org/all/20260223185558.GA3701139@bhelgaas
I do not want to use "PF" unless we're talking about a device with an
SR-IOV Capability and we're doing something specific to SR-IOV.
> Fixes: 70fa02ca1446 ("PCI: dwc: Add dw_pcie_ep_{read,write}_dbi[2] helpers")
> Reviewed-by: Niklas Cassel <cassel@kernel.org>
> Signed-off-by: Aksh Garg <a-garg7@ti.com>
> ---
>
> Changes since v1:
> - None
>
> v1: https://lore.kernel.org/all/20260202072758.101845-2-a-garg7@ti.com/
>
> drivers/pci/controller/dwc/pcie-designware-ep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
> index 7e7844ff0f7e..771241e1a2c9 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
> @@ -745,7 +745,7 @@ static int dw_pcie_ep_set_msix(struct pci_epc *epc, u8 func_no, u8 vfunc_no,
> val = dw_pcie_ep_readw_dbi(ep, func_no, reg);
> val &= ~PCI_MSIX_FLAGS_QSIZE;
> val |= nr_irqs - 1; /* encoded as N-1 */
> - dw_pcie_writew_dbi(pci, reg, val);
> + dw_pcie_ep_writew_dbi(ep, func_no, reg, val);
>
> reg = ep_func->msix_cap + PCI_MSIX_TABLE;
> val = offset | bir;
> --
> 2.34.1
>
next prev parent reply other threads:[~2026-03-06 18:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 8:38 [PATCH v3 0/2] PCI: dwc: ep: Multi-function endpoint configuration fixes Aksh Garg
2026-02-24 8:38 ` [PATCH v3 1/2] PCI: dwc: ep: Fix MSI-X configuration to write to correct physical function Aksh Garg
2026-03-06 18:45 ` Bjorn Helgaas [this message]
2026-03-09 4:49 ` Aksh Garg
2026-03-09 6:31 ` Manivannan Sadhasivam
2026-02-24 8:38 ` [PATCH v3 2/2] PCI: dwc: ep: Mirror the max link width and speed fields to all functions Aksh Garg
2026-03-05 5:04 ` [PATCH v3 0/2] PCI: dwc: ep: Multi-function endpoint configuration fixes Manivannan Sadhasivam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260306184519.GA131984@bhelgaas \
--to=helgaas@kernel.org \
--cc=Zhiqiang.Hou@nxp.com \
--cc=a-garg7@ti.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=danishanwar@ti.com \
--cc=fancer.lancer@gmail.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox