Skip to content

Commit c078cfc

Browse files
floatiouskongwoojin
authored andcommitted
PCI: dwc: ep: Fix advertised resizable BAR size regression
commit 118397c upstream. 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/[email protected] Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Niklas Cassel <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5f617ca commit c078cfc

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
@@ -689,7 +689,7 @@ static void dw_pcie_ep_init_non_sticky_registers(struct dw_pcie *pci)
689689
* for 1 MB BAR size only.
690690
*/
691691
for (i = 0; i < nbars; i++, offset += PCI_REBAR_CTRL)
692-
dw_pcie_writel_dbi(pci, offset + PCI_REBAR_CAP, 0x0);
692+
dw_pcie_writel_dbi(pci, offset + PCI_REBAR_CAP, BIT(4));
693693
}
694694

695695
dw_pcie_setup(pci);

0 commit comments

Comments
 (0)