[Skiboot] [PATCH 3/6] phb4: Skip attempting to fix PHBs broken on boot

Andrew Donnellan andrew.donnellan at au1.ibm.com
Thu Aug 10 18:16:31 AEST 2017


On 10/08/17 16:58, Russell Currey wrote:
> If a PHB is marked broken it didn't work on boot, and if it didn't work
> on boot then there's no point trying to recover it later

Can't a PHB also end up in BROKEN when a creset fails? Per the error: 
label in phb4_creset()...

> 
> Signed-off-by: Russell Currey <ruscur at russell.cc>

In any case this seems sensible.

Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

Would phb3 benefit from a similar change?

> ---
>   hw/phb4.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/hw/phb4.c b/hw/phb4.c
> index 7e8f68bf..012a8cdc 100644
> --- a/hw/phb4.c
> +++ b/hw/phb4.c
> @@ -2608,6 +2608,10 @@ static int64_t phb4_creset(struct pci_slot *slot)
>   	struct phb4 *p = phb_to_phb4(slot->phb);
>   	uint64_t pbcq_status, reg;
>   
> +	/* Don't even try fixing a broken PHB */
> +	if (p->state == PHB4_STATE_BROKEN)
> +		return OPAL_HARDWARE;
> +
>   	switch (slot->state) {
>   	case PHB4_SLOT_NORMAL:
>   	case PHB4_SLOT_CRESET_START:
> 

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Skiboot mailing list