]> git.hungrycats.org Git - linux/commit
[PATCH] fix pci_update_resource() / IORESOURCE_UNSET on PPC
authorAndrew Morton <akpm@osdl.org>
Tue, 30 Dec 2003 07:48:27 +0000 (23:48 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 30 Dec 2003 07:48:27 +0000 (23:48 -0800)
commite6b1fdb7d9b18c4b0d3f458b8ce2cad69515bab5
tree1cd9695bd4d18cadf61e643e203533103f6ccc46
parent61179b289c82c0d2095c51af71fb19b75f9ca258
[PATCH] fix pci_update_resource() / IORESOURCE_UNSET on PPC

From: Harald Welte <laforge@gnumonks.org>

[disclaimer:  This was posted on the linuxppc list before, BenH asked me=20
 to re-post it to lkml]

The prism54 (http://prism54.org) driver for my cardbus adapter works
with 2.4.x, but not 2.6.x on a Titanium G4 Powerbook IV.

On 2.6.x the error message was
PCI:0001:02:00.0 Resource 0 [00000000-00001fff] is unassigned

After investigating differences in the PCI code of 2.4.x and 2.6.x, i
noticed that 2.4.x/arc/ppc/kernel/pci.c:pcibios_update_resource()
contained a couple of lines that unset the IORESOURCE_UNSET bitflag.

In 2.6.x, this is handled by the generic PCI core in
drivers/pci/setup-res.c:pci_update_resource() code.  However, the code
is missing the 'res->flags &=3D ~IORESOURCE_UNSET' part.

The below fix re-adds that section from 2.4.x.=20

I'm not sure wether this belongs into the arch-independent PCI api.
Anyway, on PPC it seems to be needed for certain cardbus devices.

Any comments welcome.
drivers/pci/setup-res.c