kernel_samsung_a53x/drivers/pci
Niklas Cassel d577a8237c PCI: dwc: endpoint: Fix advertised resizable BAR size
[ Upstream commit 72e34b8593e08a0ee759b7a038e0b178418ea6f8 ]

The commit message in commit fc9a77040b04 ("PCI: designware-ep: Configure
Resizable BAR cap to advertise the smallest size") claims that it modifies
the Resizable BAR capability to only advertise support for 1 MB size BARs.

However, the commit writes all zeroes to PCI_REBAR_CAP (the register which
contains the possible BAR sizes that a BAR be resized to).

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.

Set bit 4 in PCI_REBAR_CAP, so that we actually advertise support for a
1 MB BAR size.

Before:
        Capabilities: [2e8 v1] Physical Resizable BAR
                BAR 0: current size: 1MB
                BAR 1: current size: 1MB
                BAR 2: current size: 1MB
                BAR 3: current size: 1MB
                BAR 4: current size: 1MB
                BAR 5: current size: 1MB
After:
        Capabilities: [2e8 v1] Physical Resizable BAR
                BAR 0: current size: 1MB, supported: 1MB
                BAR 1: current size: 1MB, supported: 1MB
                BAR 2: current size: 1MB, supported: 1MB
                BAR 3: current size: 1MB, supported: 1MB
                BAR 4: current size: 1MB, supported: 1MB
                BAR 5: current size: 1MB, supported: 1MB

Fixes: fc9a77040b04 ("PCI: designware-ep: Configure Resizable BAR cap to advertise the smallest size")
Link: https://lore.kernel.org/linux-pci/20240307111520.3303774-1-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: <stable@vger.kernel.org> # 5.2
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 09:22:35 +01:00
..
controller PCI: dwc: endpoint: Fix advertised resizable BAR size 2024-11-19 09:22:35 +01:00
endpoint Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hotplug Revert "PCI: acpiphp: Reassign resources on bridge if necessary" 2024-11-18 12:11:50 +01:00
pcie PCI/AER: Block runtime suspend when handling errors 2024-11-19 09:22:34 +01:00
switch PCI: switchtec: Fix an error handling path in switchtec_pci_probe() 2024-11-19 08:44:52 +01:00
access.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ats.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ecam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
host-bridge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iov.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msi.c PCI/MSI: Prevent MSI hardware interrupt number truncation 2024-11-18 22:25:37 +01:00
of.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
p2pdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-acpi.c PCI/sysfs: Protect driver's D3cold preference from user space 2024-11-18 11:43:21 +01:00
pci-bridge-emul.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-bridge-emul.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-driver.c PCI/PM: Drain runtime-idle callbacks before driver removal 2024-11-19 09:22:18 +01:00
pci-label.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-mid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-pf-stub.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-stub.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-sysfs.c PCI/sysfs: Protect driver's D3cold preference from user space 2024-11-18 11:43:21 +01:00
pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci.h PCI/ERR: Cache RCEC EA Capability offset in pci_init_capabilities() 2024-11-19 09:22:18 +01:00
probe.c PCI/ERR: Cache RCEC EA Capability offset in pci_init_capabilities() 2024-11-19 09:22:18 +01:00
proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
quirks.c PCI/DPC: Quirk PIO log size for Intel Raptor Lake Root Ports 2024-11-19 09:22:33 +01:00
remove.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
search.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
setup-bus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
setup-irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
setup-res.c PCI: Work around Intel I210 ROM BAR overlap defect 2024-11-19 09:22:33 +01:00
slot.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
syscall.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vpd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-pcifront.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00