From f6b4557c98121e5571c484b037897130d898287c Mon Sep 17 00:00:00 2001 From: Uma Krishnan Date: Mon, 26 Mar 2018 11:31:53 -0500 Subject: scsi: cxlflash: Adapter context support for OCXL Add support to create and release the adapter contexts for OCXL and provide means to specify certain contexts as a master. The existing cxlflash core has a design requirement that each host will have a single host context available by default. To satisfy this requirement, one host adapter context is created when the hardware AFU is initialized. This is returned by the get_context() fop. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Reviewed-by: Frederic Barrat Signed-off-by: Martin K. Petersen --- drivers/scsi/cxlflash/ocxl_hw.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/scsi/cxlflash/ocxl_hw.h') diff --git a/drivers/scsi/cxlflash/ocxl_hw.h b/drivers/scsi/cxlflash/ocxl_hw.h index 46de75b59b1a..f41ba0ba23c6 100644 --- a/drivers/scsi/cxlflash/ocxl_hw.h +++ b/drivers/scsi/cxlflash/ocxl_hw.h @@ -14,6 +14,7 @@ /* OCXL hardware AFU associated with the host */ struct ocxl_hw_afu { + struct ocxlflash_context *ocxl_ctx; /* Host context */ struct pci_dev *pdev; /* PCI device */ struct device *dev; /* Generic device */ @@ -28,3 +29,8 @@ struct ocxl_hw_afu { int max_pasid; /* Maximum number of contexts */ bool is_present; /* Function has AFUs defined */ }; + +struct ocxlflash_context { + struct ocxl_hw_afu *hw_afu; /* HW AFU back pointer */ + bool master; /* Whether this is a master context */ +}; -- cgit