diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:16:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:16:52 -0500 |
commit | c4888f9ffafe7db107b7eafb3a68eaeeff3779c3 (patch) | |
tree | d30da15f6b5d74c8c04fd92991af5e1615d95691 /arch/powerpc/platforms/pseries/eeh.c | |
parent | e36aeee65d4db050bd8713537416a0a0632db079 (diff) | |
parent | 688016f4e2028e3c2c27e959ad001536e10ee2c5 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (37 commits)
[POWERPC] EEH: Make sure warning message is printed
[POWERPC] Make altivec code in swsusp_32.S depend on CONFIG_ALTIVEC
[POWERPC] windfarm: Fix windfarm thread freezer interaction
[POWERPC] Fix si_addr value on low level hash failures
[POWERPC] Refresh ppc64_defconfig and enable pasemi-related options
[POWERPC] pasemi: Update defconfig
[POWERPC] iSeries: Fix ref counting in vio setup
[POWERPC] ] Fix memset size error
[POWERPC] Fix link errors for allyesconfig
[POWERPC] iSeries_init_IRQ non-PCI tidy
[POWERPC] Change fallocate to match unistd.h on powerpc
[POWERPC] EEH: Avoid crash on null device
[POWERPC] EEH: Drivers that need reset trump others
[POWERPC] EEH: Clean up comments
[POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2)
[POWERPC] Fix switch_slb handling of 1T ESID values
[POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not defined
[POWERPC] Include udbg.h when using udbg_printf
[POWERPC] Fix cache line vs. block size confusion
[POWERPC] Fix sysctl table check failure on PowerMac
...
Diffstat (limited to 'arch/powerpc/platforms/pseries/eeh.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 22322b35a0ff..fb3d636e088b 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -186,6 +186,11 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | |||
186 | n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg); | 186 | n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg); |
187 | printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg); | 187 | printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg); |
188 | 188 | ||
189 | if (!dev) { | ||
190 | printk(KERN_WARNING "EEH: no PCI device for this of node\n"); | ||
191 | return n; | ||
192 | } | ||
193 | |||
189 | /* Gather bridge-specific registers */ | 194 | /* Gather bridge-specific registers */ |
190 | if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) { | 195 | if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) { |
191 | rtas_read_config(pdn, PCI_SEC_STATUS, 2, &cfg); | 196 | rtas_read_config(pdn, PCI_SEC_STATUS, 2, &cfg); |
@@ -198,7 +203,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | |||
198 | } | 203 | } |
199 | 204 | ||
200 | /* Dump out the PCI-X command and status regs */ | 205 | /* Dump out the PCI-X command and status regs */ |
201 | cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_PCIX); | 206 | cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); |
202 | if (cap) { | 207 | if (cap) { |
203 | rtas_read_config(pdn, cap, 4, &cfg); | 208 | rtas_read_config(pdn, cap, 4, &cfg); |
204 | n += scnprintf(buf+n, len-n, "pcix-cmd:%x\n", cfg); | 209 | n += scnprintf(buf+n, len-n, "pcix-cmd:%x\n", cfg); |
@@ -210,7 +215,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | |||
210 | } | 215 | } |
211 | 216 | ||
212 | /* If PCI-E capable, dump PCI-E cap 10, and the AER */ | 217 | /* If PCI-E capable, dump PCI-E cap 10, and the AER */ |
213 | cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_EXP); | 218 | cap = pci_find_capability(dev, PCI_CAP_ID_EXP); |
214 | if (cap) { | 219 | if (cap) { |
215 | n += scnprintf(buf+n, len-n, "pci-e cap10:\n"); | 220 | n += scnprintf(buf+n, len-n, "pci-e cap10:\n"); |
216 | printk(KERN_WARNING | 221 | printk(KERN_WARNING |
@@ -222,7 +227,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | |||
222 | printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); | 227 | printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); |
223 | } | 228 | } |
224 | 229 | ||
225 | cap = pci_find_ext_capability(pdn->pcidev, PCI_EXT_CAP_ID_ERR); | 230 | cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); |
226 | if (cap) { | 231 | if (cap) { |
227 | n += scnprintf(buf+n, len-n, "pci-e AER:\n"); | 232 | n += scnprintf(buf+n, len-n, "pci-e AER:\n"); |
228 | printk(KERN_WARNING | 233 | printk(KERN_WARNING |
@@ -318,7 +323,7 @@ eeh_wait_for_slot_status(struct pci_dn *pdn, int max_wait_msecs) | |||
318 | 323 | ||
319 | if (rets[2] == 0) return -1; /* permanently unavailable */ | 324 | if (rets[2] == 0) return -1; /* permanently unavailable */ |
320 | 325 | ||
321 | if (max_wait_msecs <= 0) return -1; | 326 | if (max_wait_msecs <= 0) break; |
322 | 327 | ||
323 | mwait = rets[2]; | 328 | mwait = rets[2]; |
324 | if (mwait <= 0) { | 329 | if (mwait <= 0) { |