Skip to content

Commit

Permalink
PCI: dwc: Fix MSI-X EP framework address calculation bug
Browse files Browse the repository at this point in the history
Fix an error caused by 3-bit right rotation on offset address
calculation of MSI-X table in dw_pcie_ep_raise_msix_irq().

The initial testing code was setting by default the offset address of
MSI-X table to zero, so that even with a 3-bit right rotation the
computed result would still be zero and valid, therefore this bug went
unnoticed.

Fixes: beb4641 ("PCI: dwc: Add MSI-X callbacks handler")
Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
[lorenzo.pieralisi@arm.com: updated commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: stable@vger.kernel.org
  • Loading branch information
Gustavo Pimentel authored and Lorenzo Pieralisi committed Nov 27, 2018
1 parent c6fd6fe commit 15cb127
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/pci/controller/dwc/pcie-designware-ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ int dw_pcie_ep_raise_msix_irq(struct dw_pcie_ep *ep, u8 func_no,
tbl_offset = dw_pcie_readl_dbi(pci, reg);
bir = (tbl_offset & PCI_MSIX_TABLE_BIR);
tbl_offset &= PCI_MSIX_TABLE_OFFSET;
tbl_offset >>= 3;

reg = PCI_BASE_ADDRESS_0 + (4 * bir);
bar_addr_upper = 0;
Expand Down

0 comments on commit 15cb127

Please sign in to comment.