]> git.baikalelectronics.ru Git - kernel.git/commit
Fix cardbus resource allocation
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Apr 2008 01:16:30 +0000 (18:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Apr 2008 01:16:30 +0000 (18:16 -0700)
commit5f2ad6cd1c2a0bd19737a1dbb4746322a59a3cd8
treeeade0cdc07dbb8ab46c57244444fc8697e129f66
parent4ceb89d7cb157d6024126baaaaee25a8be09d2f5
Fix cardbus resource allocation

Commit 960d2b777ae8fecba17eac2730e68d49fca4f4f7 ("PCI: clean up resource
alignment management") didn't set the alignment information for the
cardbus window resources, causing their subsequent allocations to fail
miserably with a message like

  yenta_cardbus 0000:15:00.0: device not available because of BAR 7 [100:1ff] collisions
  yenta_cardbus: probe of 0000:15:00.0 failed with error -16

or similar.

This fixes it and clarifies the code a bit too (we used to have to use
the insane PCI bridge alignment logic that put the alignment in the
"start" field, this makes it use the slightly easier-to-understand
size-based alignment, and allows us to set the resource start to zero
until it gets allocated).

Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
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