projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
411cabf
)
powerpc: Fix little endian issue in OF PCI scan
author
Anton Blanchard
<
[email protected]
>
Thu, 17 Oct 2013 12:19:43 +0000
(23:19 +1100)
committer
Benjamin Herrenschmidt
<
[email protected]
>
Wed, 30 Oct 2013 05:01:04 +0000
(16:01 +1100)
This issue was causing the QEMU emulated USB device to fail dring
PCI probe.
Signed-off-by: Anton Blanchard <
[email protected]
>
Signed-off-by: Benjamin Herrenschmidt <
[email protected]
>
arch/powerpc/kernel/pci_of_scan.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/kernel/pci_of_scan.c
b/arch/powerpc/kernel/pci_of_scan.c
index 4368ec6fdc8c4084c149150a45e6ee2f3150fdcf..ac0b034f9ae0fb389a450fab78bd2da8bc737a63 100644
(file)
--- a/
arch/powerpc/kernel/pci_of_scan.c
+++ b/
arch/powerpc/kernel/pci_of_scan.c
@@
-302,7
+302,7
@@
static struct pci_dev *of_scan_pci_dev(struct pci_bus *bus,
struct device_node *dn)
{
struct pci_dev *dev = NULL;
- const
u
32 *reg;
+ const
__be
32 *reg;
int reglen, devfn;
pr_debug(" * %s\n", dn->full_name);
@@
-312,7
+312,7
@@
static struct pci_dev *of_scan_pci_dev(struct pci_bus *bus,
reg = of_get_property(dn, "reg", ®len);
if (reg == NULL || reglen < 20)
return NULL;
- devfn = (
reg[0]
>> 8) & 0xff;
+ devfn = (
of_read_number(reg, 1)
>> 8) & 0xff;
/* Check if the PCI device is already there */
dev = pci_get_slot(bus, devfn);