Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362911
b: refs/heads/master
c: 527eee2
h: refs/heads/master
i:
  362909: 6d22eb9
  362907: b4e83b7
  362903: 0927c4d
  362895: f577b4a
  362879: 14cfcf7
v: v3
  • Loading branch information
Bjorn Helgaas committed Apr 23, 2013
1 parent 978fb5a commit 7576ee6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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: 909094c62e21c71c4fd122642512ad05b75fe019
refs/heads/master: 527eee292d2ee69708a20b90049ef49bdeefc882
7 changes: 5 additions & 2 deletions trunk/drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

static int pci_msi_enable = 1;

#define msix_table_size(flags) ((flags & PCI_MSIX_FLAGS_QSIZE) + 1)


/* Arch hooks */

#ifndef arch_msi_check_device
Expand Down Expand Up @@ -681,7 +684,7 @@ static int msix_capability_init(struct pci_dev *dev,
pci_write_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, control);

/* Request & Map MSI-X table region */
base = msix_map_region(dev, multi_msix_capable(control));
base = msix_map_region(dev, msix_table_size(control));
if (!base)
return -ENOMEM;

Expand Down Expand Up @@ -904,7 +907,7 @@ int pci_msix_table_size(struct pci_dev *dev)
return 0;

pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &control);
return multi_msix_capable(control);
return msix_table_size(control);
}

/**
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/pci/msi.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@
#define msi_mask_reg(base, is64bit) \
(base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32))

#define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1)
#define multi_msix_capable(control) msix_table_size((control))

#endif /* MSI_H */

0 comments on commit 7576ee6

Please sign in to comment.