[Skiboot] [RFC 2/2] hw/phb3: disable CAPI mode during complete reset

Andrew Donnellan andrew.donnellan at au1.ibm.com
Mon Oct 24 18:55:03 AEDT 2016


Thanks for the comments Gavin! Will fix in the next revision.

On 22/10/16 14:14, Gavin Shan wrote:
>> +
>> +	/* Trigger CAPP recovery scoms after reinit */
>> +	p->flags |= PHB3_CAPP_DISABLING;
>> +
>
> It seems we needn't this extra flag. It's set when PHB is in CAPI mode
> and the creset is invoked not because of EEH recovery (PHB3_CAPP_RECOVERY).
> The caller can know PHB's mode and PHB3_CAPP_RECOVERY is accessible. The
> concern is: the flag is set by this function and just used by its caller,
> meaning it takes effect in limited range and the information conveyed by
> this flag can be passed in another better way.

Good point... though with the rework I'm currently doing, the flow might 
be a bit different, I'll see.

>
>> +	chip->capp_phb3_attached_mask &= ~(1 << p->index);
>> +	unlock(&capi_lock);
>> +
>> +	return OPAL_SUCCESS;
>
> This function always returns OPAL_SUCCESS and the caller never checks the
> return value. Do we need a return value from this function?

Hmm, probably not.

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



More information about the Skiboot mailing list