Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127339
b: refs/heads/master
c: 0ef5f8f
h: refs/heads/master
i:
  127337: 69647dd
  127335: 9206c7a
v: v3
  • Loading branch information
Andrew Patterson authored and Jesse Barnes committed Jan 7, 2009
1 parent 9a6239c commit 825697c
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 990a7ac5645883a833a11b900bb6f25b65dea65b
refs/heads/master: 0ef5f8f6159e44b4faa997be08d1a3bcbf44ad08
8 changes: 8 additions & 0 deletions trunk/arch/x86/pci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,14 @@ void pcibios_disable_device (struct pci_dev *dev)
pcibios_disable_irq(dev);
}

int pci_ext_cfg_avail(struct pci_dev *dev)
{
if (raw_pci_ext_ops)
return 1;
else
return 0;
}

struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
{
struct pci_bus *bus = NULL;
Expand Down
10 changes: 8 additions & 2 deletions trunk/drivers/acpi/pci_root.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
unsigned long long value = 0;
acpi_handle handle = NULL;
struct acpi_device *child;
u32 flags;
u32 flags, base_flags;


if (!device)
Expand All @@ -216,7 +216,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
* All supported architectures that use ACPI have support for
* PCI domains, so we indicate this in _OSC support capabilities.
*/
flags = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
flags = base_flags = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
pci_acpi_osc_support(device->handle, flags);

/*
Expand Down Expand Up @@ -344,6 +344,12 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
list_for_each_entry(child, &device->children, node)
acpi_pci_bridge_scan(child);

/* Indicate support for various _OSC capabilities. */
if (pci_ext_cfg_avail(root->bus->self))
flags |= OSC_EXT_PCI_CONFIG_SUPPORT;
if (flags != base_flags)
pci_acpi_osc_support(device->handle, flags);

end:
if (result) {
if (!list_empty(&root->node))
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2084,6 +2084,19 @@ static void __devinit pci_no_domains(void)
#endif
}

/**
* pci_ext_cfg_enabled - can we access extended PCI config space?
* @dev: The PCI device of the root bridge.
*
* Returns 1 if we can access PCI extended config space (offsets
* greater than 0xff). This is the default implementation. Architecture
* implementations can override this.
*/
int __attribute__ ((weak)) pci_ext_cfg_avail(struct pci_dev *dev)
{
return 1;
}

static int __devinit pci_init(void)
{
struct pci_dev *dev = NULL;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,8 @@ static inline void pci_mmcfg_early_init(void) { }
static inline void pci_mmcfg_late_init(void) { }
#endif

int pci_ext_cfg_avail(struct pci_dev *dev);

#ifdef CONFIG_HAS_IOMEM
static inline void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
{
Expand Down

0 comments on commit 825697c

Please sign in to comment.