Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127411
b: refs/heads/master
c: 16cf0eb
h: refs/heads/master
i:
  127409: 40d7b2b
  127407: 106d1f6
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Jesse Barnes committed Jan 7, 2009
1 parent 40a40ab commit 0c24412
Show file tree
Hide file tree
Showing 3 changed files with 12 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: ef1bba28bfe68ef3c0488feeaabd3e8bc523130c
refs/heads/master: 16cf0ebc35dd63f72628ba1246132a6fd17bced2
4 changes: 2 additions & 2 deletions trunk/arch/x86/pci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,14 +551,14 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
if ((err = pci_enable_resources(dev, mask)) < 0)
return err;

if (!dev->msi_enabled)
if (!pci_dev_msi_enabled(dev))
return pcibios_enable_irq(dev);
return 0;
}

void pcibios_disable_device (struct pci_dev *dev)
{
if (!dev->msi_enabled && pcibios_disable_irq)
if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq)
pcibios_disable_irq(dev);
}

Expand Down
9 changes: 9 additions & 0 deletions trunk/include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,15 @@ struct pci_bus {
#define pci_bus_b(n) list_entry(n, struct pci_bus, node)
#define to_pci_bus(n) container_of(n, struct pci_bus, dev)

#ifdef CONFIG_PCI_MSI
static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev)
{
return pci_dev->msi_enabled || pci_dev->msix_enabled;
}
#else
static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) { return false; }
#endif

/*
* Error values that may be returned by PCI functions.
*/
Expand Down

0 comments on commit 0c24412

Please sign in to comment.