[PATCH 1/6] powerpc/eeh: Don't collect PCI-CFG data on PHB

2013-06-25 Thread Gavin Shan
When the PHB is fenced or dead, it's pointless to collect the data from PCI config space of subordinate PCI devices since it should return 0xFF's. The patch also fixes overwritten buffer while getting PCI config data. Signed-off-by: Gavin Shan --- arch/powerpc/kernel/eeh.c | 34 +++

Re: [PATCH 1/6] powerpc/eeh: Don't collect PCI-CFG data on PHB

2013-06-25 Thread Gavin Shan
On Wed, Jun 26, 2013 at 09:57:26AM +1000, Benjamin Herrenschmidt wrote: >On Wed, 2013-06-26 at 07:49 +0800, Gavin Shan wrote: >> It's something like the followings. For ER on PE#0, we will have >> PE with type of EEH_PE_BUS marked as isolated, instead of the >> one with EEH_PE_PHB. >> >> >>

Re: [PATCH 1/6] powerpc/eeh: Don't collect PCI-CFG data on PHB

2013-06-25 Thread Benjamin Herrenschmidt
On Wed, 2013-06-26 at 07:49 +0800, Gavin Shan wrote: > It's something like the followings. For ER on PE#0, we will have > PE with type of EEH_PE_BUS marked as isolated, instead of the > one with EEH_PE_PHB. > > > [ EEH_PE_PHB] <---> [ EEH_PE_PHB] <---> [ EEH_PE_PHB] >

Re: [PATCH 1/6] powerpc/eeh: Don't collect PCI-CFG data on PHB

2013-06-25 Thread Gavin Shan
On Tue, Jun 25, 2013 at 09:56:06PM +1000, Benjamin Herrenschmidt wrote: >On Tue, 2013-06-25 at 18:00 +0800, Gavin Shan wrote: >> + pci_regs_buf[0] = 0; >> + eeh_pe_for_each_dev(pe, edev) { >> + loglen += eeh_gather_pci_data(edev, pci_regs_buf, >> +

Re: [PATCH 1/6] powerpc/eeh: Don't collect PCI-CFG data on PHB

2013-06-25 Thread Gavin Shan
On Tue, Jun 25, 2013 at 09:55:15PM +1000, Benjamin Herrenschmidt wrote: >On Tue, 2013-06-25 at 18:00 +0800, Gavin Shan wrote: >> + /* >> +* When the PHB is fenced or dead, it's pointless to collect >> +* the data from PCI config space because it should return >> +* 0xF

Re: [PATCH 1/6] powerpc/eeh: Don't collect PCI-CFG data on PHB

2013-06-25 Thread Benjamin Herrenschmidt
On Tue, 2013-06-25 at 18:00 +0800, Gavin Shan wrote: > + pci_regs_buf[0] = 0; > + eeh_pe_for_each_dev(pe, edev) { > + loglen += eeh_gather_pci_data(edev, pci_regs_buf, > + EEH_PCI_REGS_LOG_LEN); >

Re: [PATCH 1/6] powerpc/eeh: Don't collect PCI-CFG data on PHB

2013-06-25 Thread Benjamin Herrenschmidt
On Tue, 2013-06-25 at 18:00 +0800, Gavin Shan wrote: > + /* > +* When the PHB is fenced or dead, it's pointless to collect > +* the data from PCI config space because it should return > +* 0xFF's. For ER, we still retrieve the data from the PCI > +* config spac

[PATCH 1/6] powerpc/eeh: Don't collect PCI-CFG data on PHB

2013-06-25 Thread Gavin Shan
When the PHB is fenced or dead, it's pointless to collect the data from PCI config space of subordinate PCI devices since it should return 0xFF's. It also has potential risk to incur additional errors. The patch avoids collecting PCI-CFG data while PHB is in fenced or dead state. Signed-off-by: Ga