Thread (36 messages) 36 messages, 3 authors, 2016-03-02

[PATCH V4 22/23] arm64, pci, acpi: Assign legacy IRQs once device is enable.

From: Tomasz Nowicki <hidden>
Date: 2016-02-11 18:41:32
Also in: linux-acpi, linux-pci, lkml

On 11.02.2016 18:17, Lorenzo Pieralisi wrote:
quoted hunk ↗ jump to hunk
Here (on top of your series), ready for flak.

Lorenzo

-- >8 --
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index 0b53262..26ee291 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -45,28 +45,23 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
   */
  int pcibios_enable_device(struct pci_dev *dev, int mask)
  {
-	int ret;
-
  	if (pci_has_flag(PCI_PROBE_ONLY))
  		return 0;

-	ret = pci_enable_resources(dev, mask);
-	if (ret < 0)
-		return ret;
-
-#ifdef CONFIG_ACPI
-	if (!pci_dev_msi_enabled(dev))
-		return acpi_pci_irq_enable(dev);
-#endif
-	return 0;
+	return pci_enable_resources(dev, mask);
  }

  /*
- * Try to assign the IRQ number from DT when adding a new device
+ * Try to assign the IRQ number when probing a new device
   */
-int pcibios_add_device(struct pci_dev *dev)
+int pcibios_alloc_irq(struct pci_dev *dev)
  {
-	dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
+	if (acpi_disabled)
+		dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
+#ifdef CONFIG_ACPI
+	else
+		return acpi_pci_irq_enable(dev);
+#endif

  	return 0;
  }
I miss that way of solving the problem. OK lets try this way. I will 
integrate it.

Tomasz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help