diff options
author | Uma Krishnan <ukrishn@linux.vnet.ibm.com> | 2018-03-26 19:35:15 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-04-19 02:32:50 +0300 |
commit | 9433fb32b7c57c0e1cee49025a720b38b449e68c (patch) | |
tree | 6ca1ccbe3aaada2f05b87fbc746391fd8b757695 /drivers/scsi/cxlflash/ocxl_hw.c | |
parent | 66ae644b922abcbf6d3303a4e69f658b02165b31 (diff) | |
download | linux-9433fb32b7c57c0e1cee49025a720b38b449e68c.tar.xz |
scsi: cxlflash: Support AFU reset
The cxlflash core driver resets the AFU when the master contexts are created
in the initialization or recovery paths. Today, the OCXL provider service to
perform this operation is pending implementation. To avoid a crash due to a
missing fop, log an error once and return success to continue with execution.
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxlflash/ocxl_hw.c')
-rw-r--r-- | drivers/scsi/cxlflash/ocxl_hw.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index 5b5565d6572e..0a95b5f25380 100644 --- a/drivers/scsi/cxlflash/ocxl_hw.c +++ b/drivers/scsi/cxlflash/ocxl_hw.c @@ -468,6 +468,22 @@ out: } /** + * ocxlflash_afu_reset() - reset the AFU + * @ctx_cookie: Adapter context. + */ +static int ocxlflash_afu_reset(void *ctx_cookie) +{ + struct ocxlflash_context *ctx = ctx_cookie; + struct device *dev = ctx->hw_afu->dev; + + /* Pending implementation from OCXL transport services */ + dev_err_once(dev, "%s: afu_reset() fop not supported\n", __func__); + + /* Silently return success until it is implemented */ + return 0; +} + +/** * ocxlflash_set_master() - sets the context as master * @ctx_cookie: Adapter context to set as master. */ @@ -1401,6 +1417,7 @@ const struct cxlflash_backend_ops cxlflash_ocxl_ops = { .get_irq_objhndl = ocxlflash_get_irq_objhndl, .start_context = ocxlflash_start_context, .stop_context = ocxlflash_stop_context, + .afu_reset = ocxlflash_afu_reset, .set_master = ocxlflash_set_master, .get_context = ocxlflash_get_context, .dev_context_init = ocxlflash_dev_context_init, |