summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.h
diff options
context:
space:
mode:
authorRam Pai <linuxram@us.ibm.com>2011-07-25 13:08:41 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-08-01 11:50:40 -0700
commit0a2daa1cf35004f5adbf4138555cc5669abf3a3e (patch)
tree035bd37e33f7e95f226d9e46e173c043f0fbe018 /drivers/pci/pci.h
parent2aceefcbd5a73059e5f52831817ec277e987440d (diff)
downloadop-kernel-dev-0a2daa1cf35004f5adbf4138555cc5669abf3a3e.zip
op-kernel-dev-0a2daa1cf35004f5adbf4138555cc5669abf3a3e.tar.gz
PCI: make cardbus-bridge resources optional
Allocate resources to cardbus bridge only after all other genuine resources requests are satisfied. Dont retry if resource allocation for cardbus-bridges fail. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r--drivers/pci/pci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index c8cee76..b74084e 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -283,6 +283,8 @@ static inline int pci_iov_bus_range(struct pci_bus *bus)
#endif /* CONFIG_PCI_IOV */
+extern unsigned long pci_cardbus_resource_alignment(struct resource *);
+
static inline resource_size_t pci_resource_alignment(struct pci_dev *dev,
struct resource *res)
{
@@ -292,6 +294,8 @@ static inline resource_size_t pci_resource_alignment(struct pci_dev *dev,
if (resno >= PCI_IOV_RESOURCES && resno <= PCI_IOV_RESOURCE_END)
return pci_sriov_resource_alignment(dev, resno);
#endif
+ if (dev->class >> 8 == PCI_CLASS_BRIDGE_CARDBUS)
+ return pci_cardbus_resource_alignment(res);
return resource_alignment(res);
}
OpenPOWER on IntegriCloud