Skip to contentSkip to conversation

PCI/MSI: X-Gene: Remove msi_controller assignment in X-Gene PCIe driver

PATCH In review Duc Dang 3 participants 4 messages Sep 17, 2015 – Sep 25, 2015 PCI

lore
Share & tools
lore

Duc Dang

author
#0 lore raw

PATCH 1/1 PCI/MSI: X-Gene: Remove msi_controller assignment in X-Gene PCIe driver

With commit 8d63bc7beaee ("PCI/MSI: pci-xgene-msi: Get rid of struct msi_controller"), it is no longer required to assign msi_controller for X-Gene PCIe host bridge to support MSI. This patch removes this unnecessary code and also helps avoid a warning message ("failed to enable MSI") during boot.

Cc Tanmay Inamdar <[email protected]>
---
 drivers/pci/host/pci-xgene.c | 22 ----------------------
 1 file changed, 22 deletions(-)
drivers/pci/host/pci-xgene.c +0 -22
index 0236ab9..ae00ce2 100644
@@ -509,24 +509,6 @@ static int xgene_pcie_setup(struct xgene_pcie_port *port,
 	return 0;
 }
 
-static int xgene_pcie_msi_enable(struct pci_bus *bus)
-{
-	struct device_node *msi_node;
-
-	msi_node = of_parse_phandle(bus->dev.of_node,
-					"msi-parent", 0);
-	if (!msi_node)
-		return -ENODEV;
-
-	bus->msi = of_pci_find_msi_chip_by_node(msi_node);
-	if (!bus->msi)
-		return -ENODEV;
-
-	of_node_put(msi_node);
-	bus->msi->dev = &bus->dev;
-	return 0;
-}
-
 static int xgene_pcie_probe_bridge(struct platform_device *pdev)
 {
 	struct device_node *dn = pdev->dev.of_node;
@@ -567,10 +549,6 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev)
 	if (!bus)
 		return -ENOMEM;
 
-	if (IS_ENABLED(CONFIG_PCI_MSI))
-		if (xgene_pcie_msi_enable(bus))
-			dev_info(port->dev, "failed to enable MSI\n");
-
 	pci_scan_child_bus(bus);
 	pci_assign_unassigned_bus_resources(bus);
 	pci_bus_add_devices(bus);
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Wed, 16 Sep 2015 17:31:40 -0700 Duc Dang <[email protected]> wrote:

With commit 8d63bc7beaee ("PCI/MSI: pci-xgene-msi: Get rid of struct msi_controller"), it is no longer required to assign msi_controller for X-Gene PCIe host bridge to support MSI. This patch removes this unnecessary code and also helps avoid a warning message ("failed to enable MSI") during boot.

Cc Tanmay Inamdar <[email protected]>
	M.
Signature · 1 line
Jazz is not dead. It just smells funny.
author
#2 lore raw
Quoted 9 lines · Marc Zyngier
Quoted 6 lines · On Wed, 16 Sep 2015 17:31:40 -0700 Duc Dang <[email protected]> wrote:

With commit 8d63bc7beaee ("PCI/MSI: pci-xgene-msi: Get rid of struct msi_controller"), it is no longer required to assign msi_controller for X-Gene PCIe host bridge to support MSI. This patch removes this unnecessary code and also helps avoid a warning message ("failed to enable MSI") during boot.

Quoted 4 lines
Quoted 2 lines
Cc Tanmay Inamdar <[email protected]>

Thanks, Marc.

Quoted 4 lines
        M.

--
Jazz is not dead. It just smells funny.

Signature · 2 lines
Regards,
Duc Dang.
Acked-by Marc Zyngier
#3 lore raw
In reply to Marc Zyngier
Quoted 9 lines · Marc Zyngier
Quoted 6 lines · On Wed, 16 Sep 2015 17:31:40 -0700 Duc Dang <[email protected]> wrote:

With commit 8d63bc7beaee ("PCI/MSI: pci-xgene-msi: Get rid of struct msi_controller"), it is no longer required to assign msi_controller for X-Gene PCIe host bridge to support MSI. This patch removes this unnecessary code and also helps avoid a warning message ("failed to enable MSI") during boot.

Quoted 4 lines
Quoted 2 lines
Cc Tanmay Inamdar <[email protected]>

I lost the original mail from Duc, but I applied this to pci/host-xgene for v4.4 with this changelog:

commit 00b9b91cb330e70b6bc571a9aa7175b4590ca452

Author: Duc Dang <[email protected]>
Date:   Wed Sep 16 17:31:40 2015 -0700

PCI/MSI: xgene: Remove msi_controller assignment

After 8d63bc7beaee ("PCI/MSI: pci-xgene-msi: Get rid of struct msi_controller"), it is no longer required to assign msi_controller for X-Gene PCIe host bridge to support MSI.

Remove this unnecessary code. This also avoids a warning message ("failed to enable MSI") during boot.

[bhelgaas: changelog]
Cc Tanmay Inamdar <[email protected]>