]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Fix "cardbus bridge resources as optional" size handling
authorYinghai Lu <yinghai@kernel.org>
Fri, 10 Feb 2012 23:33:47 +0000 (15:33 -0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 23 Feb 2012 19:59:56 +0000 (11:59 -0800)
commit98da1f710fb330fed600dfc53da97d793d7be076
treecfba5be149def3389707a0773909d44c50b58f30
parentd056b1611c28797fa6fb292e869f5c04eb63ee7a
PCI: Fix "cardbus bridge resources as optional" size handling

We should not set the requested size to -2; that will confuse the
resource list sorting with align when SIZEALIGN is used.

Change to STARTALIGN and pass align from start;  we are safe to do that
just as we do that regular pci bridge.  In the long run, we should just
treat cardbus like a regular pci bridge.

Also fix the case when realloc_head is not passed: we should keep the
requested size.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Tested-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/setup-bus.c