aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2013-11-12 01:49:21 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-11-20 18:33:35 -0500
commitbf898ec5cbd33be11147743bee27b66b10cb2f85 (patch)
treebc913203917845a6e381d22598c313899f184c23 /arch/powerpc
parentb4789b8e6be3151a955ade74872822f30e8cd914 (diff)
powerpc/eeh: Enable PCI_COMMAND_MASTER for PCI bridges
On PHB3, we will fail to fetch IODA tables without PCI_COMMAND_MASTER on PCI bridges. According to one experiment I had, the MSIx interrupts didn't raise from the adapter without the bit applied to all upstream PCI bridges including root port of the adapter. The patch forces to have that bit enabled accordingly. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> CC: <stable@vger.kernel.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/eeh.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 671302065347..4bd687d5e7aa 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -686,6 +686,15 @@ void eeh_save_bars(struct eeh_dev *edev)
686 686
687 for (i = 0; i < 16; i++) 687 for (i = 0; i < 16; i++)
688 eeh_ops->read_config(dn, i * 4, 4, &edev->config_space[i]); 688 eeh_ops->read_config(dn, i * 4, 4, &edev->config_space[i]);
689
690 /*
691 * For PCI bridges including root port, we need enable bus
692 * master explicitly. Otherwise, it can't fetch IODA table
693 * entries correctly. So we cache the bit in advance so that
694 * we can restore it after reset, either PHB range or PE range.
695 */
696 if (edev->mode & EEH_DEV_BRIDGE)
697 edev->config_space[1] |= PCI_COMMAND_MASTER;
689} 698}
690 699
691/** 700/**