linux-stable/arch/mips
Alexander Bigga 32136568a9 [MIPS] Fix for pci config_access on alchemy au1x000
I've encountered a serious problem with PCI config space access on Au1x000
platforms with recent 2.6.x-kernel. With 2.4.31 the same hardware works fine.
So I was looking for the differences:

Symptoms:
- no PCI-device is seen on bootup though two or three cards are present
- lspci output is empty
- OR: lspci shows 20 times the same device
(- OR: in some slot-configurations it worked anyhow)

System(s):
1. platform with Au1500 and three PCI-devices (actually a mycable XXS1500
    with backplane for three PCI-devices)
2. platform with Au1550 and two PCI-devices (custom board)

Debugging:
I digged down to the config_access() of the au1xxx-processors in
arch/mips/pci/ops-au1000.c and switched on DEBUG.

The code of config_access() seems to be almost the same as of the
2.4.x-kernel. But the "pci_cfg_vm->addr" returned by get_vm_area(0x2000, 0)
once on booting is different. That's of course not forbidden. But the
alignment seems to be wrong. In my case, I received:

2.4.31: pci_cfg_vm->addr = c0000000
2.6.18-rc5: pci_cfg_vm->addr = c0101000

To make it short: With 2.6.x it fails on the first config-access with:
"PCI ERR detected: status 83a00356".

Fixup:
My fix is now, to use the VM_IOREMAP-flag in the get_vm_area call. This flag
seems to be introduced in mm/vmalloc.c a long time ago (in 2.6.7-bk13, I
found in gitweb).
Now, the returned address is pci_cfg_vm->addr = c0104000 and everything works
fine.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-09-27 13:37:38 +01:00
..
arc Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
au1000 [MIPS] db1x00: Remove unused mirage_ts.c 2006-09-27 13:37:05 +01:00
basler/excite [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
boot Add .gitignore files for MIPS. 2005-11-07 18:05:37 +00:00
cobalt [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
configs [MIPS] Updat mpc30x defconfig 2006-09-27 13:37:05 +01:00
ddb5xxx [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
dec [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
emma2rh [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
galileo-boards/ev96100 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
gt64120 [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
ite-boards [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
jazz [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
jmr3927 [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
kernel [MIPS] Make prepare_frametrace() not clobber v0 2006-09-27 13:37:37 +01:00
lasat [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
lib Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
lib-32 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
lib-64 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
math-emu Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mips-boards [MIPS] MIPSsim: Build fix, rename sim_timer_setup -> plat_timer_setup. 2006-07-13 21:26:19 +01:00
mm [MIPS] Do not use drop_mmu_context to flusing other task's VIPT I-cache. 2006-09-27 13:37:37 +01:00
momentum [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
oprofile [MIPS] Oprofile: Fix build failure due to warning and -Werror. 2006-07-13 21:26:09 +01:00
pci [MIPS] Fix for pci config_access on alchemy au1x000 2006-09-27 13:37:38 +01:00
philips/pnx8550 [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
pmc-sierra [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
qemu [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
sgi-ip22 [MIPS] IP22 Fix brown paper bag in RTC code. 2006-07-13 21:26:18 +01:00
sgi-ip27 [PATCH] reduce MAX_NR_ZONES: move HIGHMEM counters into highmem.c/.h 2006-09-26 08:48:46 -07:00
sgi-ip32 [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
sibyte [MIPS] Fix 32-bit kernel by replacing 64-bit-only code. 2006-09-27 13:37:35 +01:00
sni [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
tx4927 [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
tx4938 [MIPS] Replace board_timer_setup function pointer by plat_timer_setup. 2006-07-13 21:26:17 +01:00
vr41xx [MIPS] vr41xx: Update workpad setup function 2006-07-13 21:26:21 +01:00
defconfig [MIPS] Update defconfigs to 2.6.18-rc1. 2006-07-13 21:25:57 +01:00
Kconfig [MIPS] MT: When doing "select SMP" also select SMP's prerequesites or ... 2006-09-27 13:37:35 +01:00
Kconfig.debug [MIPS] TRACE_IRQFLAGS_SUPPORT support. 2006-07-13 21:26:09 +01:00
Makefile [MIPS] Remove vmlinux.rm200 target from makefile. 2006-07-13 21:26:12 +01:00