Commit 9433fb32 authored by Uma Krishnan's avatar Uma Krishnan Committed by Martin K. Petersen

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: default avatarUma Krishnan <ukrishn@linux.vnet.ibm.com>
Acked-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 66ae644b
...@@ -467,6 +467,22 @@ static int ocxlflash_stop_context(void *ctx_cookie) ...@@ -467,6 +467,22 @@ static int ocxlflash_stop_context(void *ctx_cookie)
return rc; return rc;
} }
/**
* 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 * ocxlflash_set_master() - sets the context as master
* @ctx_cookie: Adapter context to set as master. * @ctx_cookie: Adapter context to set as master.
...@@ -1401,6 +1417,7 @@ const struct cxlflash_backend_ops cxlflash_ocxl_ops = { ...@@ -1401,6 +1417,7 @@ const struct cxlflash_backend_ops cxlflash_ocxl_ops = {
.get_irq_objhndl = ocxlflash_get_irq_objhndl, .get_irq_objhndl = ocxlflash_get_irq_objhndl,
.start_context = ocxlflash_start_context, .start_context = ocxlflash_start_context,
.stop_context = ocxlflash_stop_context, .stop_context = ocxlflash_stop_context,
.afu_reset = ocxlflash_afu_reset,
.set_master = ocxlflash_set_master, .set_master = ocxlflash_set_master,
.get_context = ocxlflash_get_context, .get_context = ocxlflash_get_context,
.dev_context_init = ocxlflash_dev_context_init, .dev_context_init = ocxlflash_dev_context_init,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment