Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28587
b: refs/heads/master
c: 1edab4a
h: refs/heads/master
i:
  28585: a053bec
  28583: b87602d
v: v3
  • Loading branch information
Brice Goglin authored and Greg Kroah-Hartman committed Jun 21, 2006
1 parent 1b84964 commit d83f1b9
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 74d0a988d3aa359b6b8a8536c8cb92cce02ca5d5
refs/heads/master: 1edab4a164b229807853682f7ff7858c11dd3481
14 changes: 12 additions & 2 deletions trunk/drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@ static int msix_capability_init(struct pci_dev *dev,
**/
int pci_enable_msi(struct pci_dev* dev)
{
struct pci_bus *bus;
int pos, temp, status = -EINVAL;
u16 control;

Expand All @@ -925,8 +926,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;
for (bus = dev->bus; bus; bus = bus->parent)
if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI)
return -EINVAL;

temp = dev->irq;

Expand Down Expand Up @@ -1162,6 +1164,7 @@ static int reroute_msix_table(int head, struct msix_entry *entries, int *nvec)
**/
int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec)
{
struct pci_bus *bus;
int status, pos, nr_entries, free_vectors;
int i, j, temp;
u16 control;
Expand All @@ -1170,6 +1173,13 @@ int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec)
if (!pci_msi_enable || !dev || !entries)
return -EINVAL;

if (dev->no_msi)
return -EINVAL;

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

status = msi_init();
if (status < 0)
return status;
Expand Down

0 comments on commit d83f1b9

Please sign in to comment.