[PATCH v2 04/53] MIPS: PCI: xtalk-bridge: flush config space writes

From: Imre Kaloz

Date: Tue Oct 13 2026 - 11:32:49 EST


PIC hangs on a config access issued behind a config write that is still
posted, as when probing an SGI PCI digital audio board. Read the widget
flush register after each config write other than an IOC3's.

Signed-off-by: Imre Kaloz <kaloz@xxxxxxxxxx>
---
arch/mips/pci/pci-xtalk-bridge.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/mips/pci/pci-xtalk-bridge.c b/arch/mips/pci/pci-xtalk-bridge.c
index 18251a68fa06..16c1ac2c2551 100644
--- a/arch/mips/pci/pci-xtalk-bridge.c
+++ b/arch/mips/pci/pci-xtalk-bridge.c
@@ -252,6 +252,9 @@ static int pci_conf0_write_config(struct pci_bus *bus, unsigned int devfn,
if (res)
return PCIBIOS_DEVICE_NOT_FOUND;

+ /* PIC hangs on a config access behind an unflushed config write. */
+ bridge_read(bc, b_wid_tflush);
+
return PCIBIOS_SUCCESSFUL;
}

@@ -293,6 +296,8 @@ static int pci_conf1_write_config(struct pci_bus *bus, unsigned int devfn,
if (res)
return PCIBIOS_DEVICE_NOT_FOUND;

+ bridge_read(bc, b_wid_tflush);
+
return PCIBIOS_SUCCESSFUL;
}

--
2.47.3