[Skiboot] [PATCH v3 4/8] phb4/capp: Update and re-factor phb4_set_capi_mode()

christophe lombard clombard at linux.vnet.ibm.com
Wed Jan 9 03:43:38 AEDT 2019


Le 08/01/2019 à 10:58, Vaibhav Jain a écrit :
> Presently phb4_set_capi_mode() performs certain CAPP checks
> like, checking of CAPP ucode loaded or checks if CAPP is still in
> recovery, even when the requested mode is to switch to PCI mode.
> 
> Hence this patch updates and re-factors phb4_set_capi_mode() to make
> sure CAPP related checks are only performed when request to enable
> CAPP is made by mode==OPAL_PHB_CAPI_MODE_CAPI/DMA_TVT1. We also update
> other possible modes requests to return a more appropriate status code
> based on if CAPP is activated or not.
> 
> Signed-off-by: Vaibhav Jain <vaibhav at linux.ibm.com>
> ---
> Change-log
> 
> v3:	Updated the code to use capp_xscom_read() instead of xscom_read().
> 
>      	Moved the check for CAPP recovery in progress from
> 	MODE_CAPI/DMA to all CAPP mode switch requests. This preserves
> 	existing behaviour expected by CX5 driver. [ Christophe ]
> 
>      	Fixed a minor spelling. [ Andrew ]
> 
> v2: 	Using 'struct capp* instead of global 'capi_lock' to indicate
> 	that CAPP is now attached to a PHB [Andrew] Code formatting that
> 	removed the use of a confusing tertiary operator. [Andrew]
> ---

Reviewed-by: Christophe Lombard <clombard at linux.vnet.ibm.com>



More information about the Skiboot mailing list