]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: fix pbus_size_mem() resource alignment for CardBus controllers
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Sep 2008 08:33:59 +0000 (01:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Sep 2008 08:33:59 +0000 (01:33 -0700)
commit2f651d3e2f7c902e7e6fc5d02daf4e07c280a837
treef5da29c42ce3b29a35791d9192fbcbe0fb737f30
parentc6f7de7d639a2d5a9418a9369ee73640bced84bb
PCI: fix pbus_size_mem() resource alignment for CardBus controllers

Commit 960d2b777ae8fecba17eac2730e68d49fca4f4f7 ("PCI: clean up resource
alignment management") changed the resource handling to mark how a
resource was aligned on a per-resource basis.

Thus, instead of looking at the resource number to determine whether it
was a bridge resource or a regular resource (they have different
alignment rules), we should just ask the resource for its alignment
directly.

The reason this broke only cardbus resources was that for the other
types of resources, the old way of deciding alignment actually still
happened to work.  But CardBus bridge resources had been changed by
commit 5f2ad6cd1c2a0bd19737a1dbb4746322a59a3cd8 ("Fix cardbus resource
allocation") to look more like regular resources than PCI bridge
resources from an alignment handling standpoint.

Reported-and-tested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pci/setup-bus.c