Re: Regression with commit PCI: mvebu: Convert to PCI emulated bridge config space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Luis,

On Tue, 18 Dec 2018 14:47:02 +0100, Thomas Petazzoni wrote:

> Thanks for the bug report! I have an idea of what could be causing
> this, I've cooked a patch, I'm doing a build test. I of course won't be
> able to test it as I don't have amdgpu hardware, but I'll share the
> patch with you for testing.

Could you try the below patch:

diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
index fa0fc46edb0c..62468415e063 100644
--- a/drivers/pci/controller/pci-mvebu.c
+++ b/drivers/pci/controller/pci-mvebu.c
@@ -469,6 +469,23 @@ mvebu_pci_bridge_emul_pcie_conf_read(struct pci_bridge_emul *bridge,
        return PCI_BRIDGE_EMUL_HANDLED;
 }
 
+static pci_bridge_emul_read_status_t
+mvebu_pci_bridge_emul_base_conf_read(struct pci_bridge_emul *bridge,
+                                    int reg, u32 *value)
+{
+       switch(reg) {
+       case PCI_ROM_ADDRESS1:
+               /* We don't support the PCI ROM mechanism */
+               *value = 0;
+               break;
+
+       default:
+               return PCI_BRIDGE_EMUL_NOT_HANDLED;
+       }
+
+       return PCI_BRIDGE_EMUL_HANDLED;
+}
+
 static void
 mvebu_pci_bridge_emul_base_conf_write(struct pci_bridge_emul *bridge,
                                      int reg, u32 old, u32 new, u32 mask)
@@ -555,6 +572,7 @@ mvebu_pci_bridge_emul_pcie_conf_write(struct pci_bridge_emul *bridge,
 }
 
 struct pci_bridge_emul_ops mvebu_pci_bridge_emul_ops = {
+       .read_base = mvebu_pci_bridge_emul_base_conf_read,
        .write_base = mvebu_pci_bridge_emul_base_conf_write,
        .read_pcie = mvebu_pci_bridge_emul_pcie_conf_read,
        .write_pcie = mvebu_pci_bridge_emul_pcie_conf_write,

If that fixes the problem for you, I'll send it as a proper patch with
a commit log that explains the issue.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux