diff options
| -rw-r--r-- | arch/powerpc/platforms/pseries/eeh.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 6f544ba4b37f..c027f0a70a04 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
| @@ -812,6 +812,7 @@ int rtas_set_slot_reset(struct pci_dn *pdn) | |||
| 812 | static inline void __restore_bars (struct pci_dn *pdn) | 812 | static inline void __restore_bars (struct pci_dn *pdn) |
| 813 | { | 813 | { |
| 814 | int i; | 814 | int i; |
| 815 | u32 cmd; | ||
| 815 | 816 | ||
| 816 | if (NULL==pdn->phb) return; | 817 | if (NULL==pdn->phb) return; |
| 817 | for (i=4; i<10; i++) { | 818 | for (i=4; i<10; i++) { |
| @@ -832,6 +833,19 @@ static inline void __restore_bars (struct pci_dn *pdn) | |||
| 832 | 833 | ||
| 833 | /* max latency, min grant, interrupt pin and line */ | 834 | /* max latency, min grant, interrupt pin and line */ |
| 834 | rtas_write_config(pdn, 15*4, 4, pdn->config_space[15]); | 835 | rtas_write_config(pdn, 15*4, 4, pdn->config_space[15]); |
| 836 | |||
| 837 | /* Restore PERR & SERR bits, some devices require it, | ||
| 838 | don't touch the other command bits */ | ||
| 839 | rtas_read_config(pdn, PCI_COMMAND, 4, &cmd); | ||
| 840 | if (pdn->config_space[1] & PCI_COMMAND_PARITY) | ||
| 841 | cmd |= PCI_COMMAND_PARITY; | ||
| 842 | else | ||
| 843 | cmd &= ~PCI_COMMAND_PARITY; | ||
| 844 | if (pdn->config_space[1] & PCI_COMMAND_SERR) | ||
| 845 | cmd |= PCI_COMMAND_SERR; | ||
| 846 | else | ||
| 847 | cmd &= ~PCI_COMMAND_SERR; | ||
| 848 | rtas_write_config(pdn, PCI_COMMAND, 4, cmd); | ||
| 835 | } | 849 | } |
| 836 | 850 | ||
| 837 | /** | 851 | /** |
