diff options
author | Vaibhav Jain <vaibhav@linux.vnet.ibm.com> | 2018-03-02 16:42:46 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2018-03-06 18:33:47 -0600 |
commit | b1190f403248a428cdbe0538fc55faf023b9b8ee (patch) | |
tree | 1c87234d7af8f919b902393ff69e0d7283adf401 /hw | |
parent | a72d055d93378e934df38a4bb1787e427fbf21cf (diff) | |
download | skiboot-b1190f403248a428cdbe0538fc55faf023b9b8ee.zip skiboot-b1190f403248a428cdbe0538fc55faf023b9b8ee.tar.gz skiboot-b1190f403248a428cdbe0538fc55faf023b9b8ee.tar.bz2 |
capp: Disable fast-reboot whenever enable_capi_mode() is called
This patch updates phb4_set_capi_mode() to disable fast-reboot
whenever enable_capi_mode() is called, irrespective to its return
value. This should prevent against a possibility of not disabling
fast-reboot when some changes to enable_capi_mode() causing return of
an error and leaving CAPP in enabled mode.
Suggested-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/phb4.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -4061,11 +4061,13 @@ static int64_t phb4_set_capi_mode(struct phb *phb, uint64_t mode, ret = enable_capi_mode(p, pe_number, CAPI_DMA_TVT0, CAPP_MAX_STQ_ENGINES | CAPP_MIN_DMA_READ_ENGINES); + disable_fast_reboot("CAPP being enabled"); break; case OPAL_PHB_CAPI_MODE_DMA_TVT1: ret = enable_capi_mode(p, pe_number, CAPI_DMA_TVT1, CAPP_MIN_STQ_ENGINES | CAPP_MAX_DMA_READ_ENGINES); + disable_fast_reboot("CAPP being enabled"); break; case OPAL_PHB_CAPI_MODE_SNOOP_ON: /* nothing to do P9 if CAPP is alreay enabled */ @@ -4079,10 +4081,6 @@ static int64_t phb4_set_capi_mode(struct phb *phb, uint64_t mode, ret = OPAL_UNSUPPORTED; } - /* If CAPP enabled then disable fast-reboot for now */ - if (ret == OPAL_SUCCESS) - disable_fast_reboot("CAPP being enabled"); - return ret; } |