diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-12-19 21:41:04 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-12-19 21:41:04 +0000 |
commit | d94f1f903602e47db2ea0ec6458627ecddb1bd49 (patch) | |
tree | 558be8f3e03928c0518d80a9a58818ae51eb2a18 /target/linux/rb532-2.6/patches/100-rb5xx_support.patch | |
parent | 427f5c53f9815b00374317554fc2a73a9718b151 (diff) |
add a better pci fix for rb532
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5861 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rb532-2.6/patches/100-rb5xx_support.patch')
-rw-r--r-- | target/linux/rb532-2.6/patches/100-rb5xx_support.patch | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/target/linux/rb532-2.6/patches/100-rb5xx_support.patch b/target/linux/rb532-2.6/patches/100-rb5xx_support.patch index 43e68c01b..45c8fe3b9 100644 --- a/target/linux/rb532-2.6/patches/100-rb5xx_support.patch +++ b/target/linux/rb532-2.6/patches/100-rb5xx_support.patch @@ -130,13 +130,14 @@ diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32434.c --- linux.old/arch/mips/pci/ops-rc32434.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/arch/mips/pci/ops-rc32434.c 2006-12-14 04:09:50.000000000 +0100 -@@ -0,0 +1,195 @@ +@@ -0,0 +1,218 @@ +/************************************************************************** + * + * BRIEF MODULE DESCRIPTION + * pci_ops for IDT EB434 board + * + * Copyright 2004 IDT Inc. (rischelp@idt.com) ++ * Copyright 2006 Felix Fietkau <nbd@openwrt.org> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the @@ -242,8 +243,30 @@ diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32 + int where, u32 * val) +{ + int ret; -+ ++ int delay = 1; ++ ++ if (bus->number == 0 && (devfn >> 3) > 21) ++ return 0; ++ ++retry: + ret = config_access(PCI_ACCESS_READ, bus, devfn, where, val); ++ ++ /* PCI scan: check for invalid values, device may not have ++ * finished initializing */ ++ ++ if (where == PCI_VENDOR_ID) { ++ if (ret == 0xffffffff || ret == 0x00000000 || ++ ret == 0x0000ffff || ret == 0xffff0000) { ++ ++ if (delay > 4) ++ return 0; ++ ++ delay *= 2; ++ msleep(delay); ++ goto retry; ++ } ++ } ++ + return ret; +} + |