diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-15 19:47:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-15 19:47:55 -0400 |
commit | 72357d59559e3b9293bdea9c0d755862504f2bf3 (patch) | |
tree | 3a047c436154201bfa5bf8682b9379e718d7dcc3 | |
parent | 7c7327d9664280cad833da1f14bad13a3ea8f0bf (diff) | |
parent | 8d181018532dd709ec1f789e374cda92d7b01ce1 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI MSI: Fix MSI-X with NIU cards
PCI: Fix pci-e port driver slot_reset bad default return value
-rw-r--r-- | drivers/pci/msi.c | 8 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv.h | 3 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 6f2e6295e773..362773247fbf 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -455,8 +455,6 @@ static int msix_capability_init(struct pci_dev *dev, | |||
455 | entry->msi_attrib.default_irq = dev->irq; | 455 | entry->msi_attrib.default_irq = dev->irq; |
456 | entry->msi_attrib.pos = pos; | 456 | entry->msi_attrib.pos = pos; |
457 | entry->mask_base = base; | 457 | entry->mask_base = base; |
458 | entry->masked = readl(base + j * PCI_MSIX_ENTRY_SIZE + | ||
459 | PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET); | ||
460 | msix_mask_irq(entry, 1); | 458 | msix_mask_irq(entry, 1); |
461 | 459 | ||
462 | list_add_tail(&entry->list, &dev->msi_list); | 460 | list_add_tail(&entry->list, &dev->msi_list); |
@@ -493,6 +491,12 @@ static int msix_capability_init(struct pci_dev *dev, | |||
493 | msix_set_enable(dev, 1); | 491 | msix_set_enable(dev, 1); |
494 | dev->msix_enabled = 1; | 492 | dev->msix_enabled = 1; |
495 | 493 | ||
494 | list_for_each_entry(entry, &dev->msi_list, list) { | ||
495 | int vector = entry->msi_attrib.entry_nr; | ||
496 | entry->masked = readl(base + vector * PCI_MSIX_ENTRY_SIZE + | ||
497 | PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET); | ||
498 | } | ||
499 | |||
496 | return 0; | 500 | return 0; |
497 | } | 501 | } |
498 | 502 | ||
diff --git a/drivers/pci/pcie/aer/aerdrv.h b/drivers/pci/pcie/aer/aerdrv.h index c7ad68b6c6d6..aa14482a4779 100644 --- a/drivers/pci/pcie/aer/aerdrv.h +++ b/drivers/pci/pcie/aer/aerdrv.h | |||
@@ -95,6 +95,9 @@ struct aer_broadcast_data { | |||
95 | static inline pci_ers_result_t merge_result(enum pci_ers_result orig, | 95 | static inline pci_ers_result_t merge_result(enum pci_ers_result orig, |
96 | enum pci_ers_result new) | 96 | enum pci_ers_result new) |
97 | { | 97 | { |
98 | if (new == PCI_ERS_RESULT_NONE) | ||
99 | return orig; | ||
100 | |||
98 | switch (orig) { | 101 | switch (orig) { |
99 | case PCI_ERS_RESULT_CAN_RECOVER: | 102 | case PCI_ERS_RESULT_CAN_RECOVER: |
100 | case PCI_ERS_RESULT_RECOVERED: | 103 | case PCI_ERS_RESULT_RECOVERED: |
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index b924e2463f85..091ce70051e0 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -200,7 +200,7 @@ static int slot_reset_iter(struct device *device, void *data) | |||
200 | 200 | ||
201 | static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) | 201 | static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) |
202 | { | 202 | { |
203 | pci_ers_result_t status = PCI_ERS_RESULT_NONE; | 203 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
204 | int retval; | 204 | int retval; |
205 | 205 | ||
206 | /* If fatal, restore cfg space for possible link reset at upstream */ | 206 | /* If fatal, restore cfg space for possible link reset at upstream */ |