From d91ef9c3803d53aae26f331194225f329c19a741 Mon Sep 17 00:00:00 2001 From: Mike Mason Date: Wed, 9 Jul 2008 02:04:35 +1000 Subject: [PATCH] --- yaml --- r: 101780 b: refs/heads/master c: cde274c0c789404df8ece3f9e7d6506caf0127e2 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/pseries/eeh.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5d3f044670b4..4ce5f8d03abd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b887ec620a7575f54fa025d38fa1008dc8a3b12a +refs/heads/master: cde274c0c789404df8ece3f9e7d6506caf0127e2 diff --git a/trunk/arch/powerpc/platforms/pseries/eeh.c b/trunk/arch/powerpc/platforms/pseries/eeh.c index 6f544ba4b37f..c027f0a70a04 100644 --- a/trunk/arch/powerpc/platforms/pseries/eeh.c +++ b/trunk/arch/powerpc/platforms/pseries/eeh.c @@ -812,6 +812,7 @@ int rtas_set_slot_reset(struct pci_dn *pdn) static inline void __restore_bars (struct pci_dn *pdn) { int i; + u32 cmd; if (NULL==pdn->phb) return; for (i=4; i<10; i++) { @@ -832,6 +833,19 @@ static inline void __restore_bars (struct pci_dn *pdn) /* max latency, min grant, interrupt pin and line */ rtas_write_config(pdn, 15*4, 4, pdn->config_space[15]); + + /* Restore PERR & SERR bits, some devices require it, + don't touch the other command bits */ + rtas_read_config(pdn, PCI_COMMAND, 4, &cmd); + if (pdn->config_space[1] & PCI_COMMAND_PARITY) + cmd |= PCI_COMMAND_PARITY; + else + cmd &= ~PCI_COMMAND_PARITY; + if (pdn->config_space[1] & PCI_COMMAND_SERR) + cmd |= PCI_COMMAND_SERR; + else + cmd &= ~PCI_COMMAND_SERR; + rtas_write_config(pdn, PCI_COMMAND, 4, cmd); } /**