Skip to content

Commit 118397c

Browse files
floatiouskwilczynski
authored andcommitted
PCI: dwc: ep: Fix advertised resizable BAR size regression
The advertised resizable BAR size was fixed in commit 72e34b8 ("PCI: dwc: endpoint: Fix advertised resizable BAR size"). Commit 867ab11 ("PCI: dwc: ep: Add a generic dw_pcie_ep_linkdown() API to handle Link Down event") was included shortly after this, and moved the code to another function. When the code was moved, this fix was mistakenly lost. According to the spec, it is illegal to not have a bit set in PCI_REBAR_CAP, and 1 MB is the smallest size allowed. So, set bit 4 in PCI_REBAR_CAP, so that we actually advertise support for a 1 MB BAR size. Fixes: 867ab11 ("PCI: dwc: ep: Add a generic dw_pcie_ep_linkdown() API to handle Link Down event") Link: https://lore.kernel.org/r/20241116005950.2480427-2-cassel@kernel.org Link: https://lore.kernel.org/r/20240606-pci-deinit-v1-3-4395534520dc@linaro.org Link: https://lore.kernel.org/r/20240307111520.3303774-1-cassel@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Cc: stable@vger.kernel.org
1 parent 154fc1f commit 118397c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ static void dw_pcie_ep_init_non_sticky_registers(struct dw_pcie *pci)
690690
* for 1 MB BAR size only.
691691
*/
692692
for (i = 0; i < nbars; i++, offset += PCI_REBAR_CTRL)
693-
dw_pcie_writel_dbi(pci, offset + PCI_REBAR_CAP, 0x0);
693+
dw_pcie_writel_dbi(pci, offset + PCI_REBAR_CAP, BIT(4));
694694
}
695695

696696
dw_pcie_setup(pci);

0 commit comments

Comments
 (0)