Thread (32 messages) 32 messages, 2 authors, 2015-03-09
STALE4117d
Revisions (16)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v2 [diff vs current]
  4. v2 [diff vs current]
  5. v3 [diff vs current]
  6. v3 [diff vs current]
  7. v4 [diff vs current]
  8. v4 [diff vs current]
  9. v5 [diff vs current]
  10. v5 current
  11. v6 [diff vs current]
  12. v7 [diff vs current]
  13. v8 [diff vs current]
  14. v8 [diff vs current]
  15. v9 [diff vs current]
  16. v10 [diff vs current]

[PATCH v5 18/29] sparc/PCI: Claim bus resources before pci_bus_add_devices()

From: Yijing Wang <hidden>
Date: 2015-03-06 09:36:59
Also in: linux-alpha, linux-pci, lkml
Subsystem: sparc + ultrasparc (sparc/sparc64), the rest · Maintainers: "David S. Miller", Andreas Larsson, Linus Torvalds

Pci_claim_bus_resources() should be called before
pci_bus_add_devices(), or driver may failed to
load, because the resources had not claimed.

Signed-off-by: Yijing Wang <redacted>
---
 arch/sparc/kernel/pci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 838fe1e..21f804a 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -678,11 +678,10 @@ struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
 	}
 
 	pci_of_scan_bus(pbm, node, bus);
-	pci_bus_add_devices(bus);
 	pci_bus_register_of_sysfs(bus);
 
 	pci_claim_bus_resources(bus);
-
+	pci_bus_add_devices(bus);
 	return bus;
 }
 
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help