Skip to content

Commit 1411e7d

Browse files
AkshGarg-19gregkh
authored andcommitted
PCI: dwc: ep: Fix MSI-X Table Size configuration in dw_pcie_ep_set_msix()
[ Upstream commit 271d0b1 ] In dw_pcie_ep_set_msix(), while updating the MSI-X Table Size value for individual functions, Message Control register is read from the passed function number register space using dw_pcie_ep_readw_dbi(), but always written back to the Function 0's register space using dw_pcie_writew_dbi(). This causes incorrect MSI-X configuration for the rest of the functions, other than Function 0. Fix this by using dw_pcie_ep_writew_dbi() to write to the correct function's register space, matching the read operation. Fixes: 70fa02c ("PCI: dwc: Add dw_pcie_ep_{read,write}_dbi[2] helpers") Signed-off-by: Aksh Garg <a-garg7@ti.com> [mani: commit log] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Niklas Cassel <cassel@kernel.org> Link: https://patch.msgid.link/20260224083817.916782-2-a-garg7@ti.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 18d366c commit 1411e7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pci/controller/dwc/pcie-designware-ep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static int dw_pcie_ep_set_msix(struct pci_epc *epc, u8 func_no, u8 vfunc_no,
423423
val = dw_pcie_ep_readw_dbi(ep, func_no, reg);
424424
val &= ~PCI_MSIX_FLAGS_QSIZE;
425425
val |= nr_irqs - 1; /* encoded as N-1 */
426-
dw_pcie_writew_dbi(pci, reg, val);
426+
dw_pcie_ep_writew_dbi(ep, func_no, reg, val);
427427

428428
reg = ep_func->msix_cap + PCI_MSIX_TABLE;
429429
val = offset | bir;

0 commit comments

Comments
 (0)