Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23204
b: refs/heads/master
c: 6e325a6
h: refs/heads/master
v: v3
  • Loading branch information
Michael S. Tsirkin authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent 0617187 commit 8f89790
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 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: e5548e960f38557825e50806b52cb24c9e730aa2
refs/heads/master: 6e325a62a0a228cd0222783802b53cce04551776
3 changes: 3 additions & 0 deletions trunk/drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,9 @@ int pci_enable_msi(struct pci_dev* dev)
if (dev->no_msi)
return status;

if (dev->bus->bus_flags & PCI_BUS_FLAGS_NO_MSI)
return -EINVAL;

temp = dev->irq;

status = msi_init();
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ pci_alloc_child_bus(struct pci_bus *parent, struct pci_dev *bridge, int busnr)
child->parent = parent;
child->ops = parent->ops;
child->sysdata = parent->sysdata;
child->bus_flags = parent->bus_flags;
child->bridge = get_device(&bridge->dev);

child->class_dev.class = &pcibus_class;
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/pci/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,11 @@ static void __init quirk_amd_8131_ioapic(struct pci_dev *dev)
{
unsigned char revid, tmp;

pci_msi_quirk = 1;
printk(KERN_WARNING "PCI: MSI quirk detected. pci_msi_quirk set.\n");
if (dev->subordinate) {
printk(KERN_WARNING "PCI: MSI quirk detected. "
"PCI_BUS_FLAGS_NO_MSI set for subordinate bus.\n");
dev->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
}

if (nr_ioapics == 0)
return;
Expand Down
7 changes: 6 additions & 1 deletion trunk/include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ enum pci_channel_state {
pci_channel_io_perm_failure = (__force pci_channel_state_t) 3,
};

typedef unsigned short __bitwise pci_bus_flags_t;
enum pci_bus_flags {
PCI_BUS_FLAGS_NO_MSI = (pci_bus_flags_t) 1,
};

/*
* The pci_dev structure is used to describe PCI devices.
*/
Expand Down Expand Up @@ -203,7 +208,7 @@ struct pci_bus {
char name[48];

unsigned short bridge_ctl; /* manage NO_ISA/FBB/et al behaviors */
unsigned short pad2;
pci_bus_flags_t bus_flags; /* Inherited by child busses */
struct device *bridge;
struct class_device class_dev;
struct bin_attribute *legacy_io; /* legacy I/O for this bus */
Expand Down

0 comments on commit 8f89790

Please sign in to comment.