diff options
author | Uma Krishnan <ukrishn@linux.vnet.ibm.com> | 2018-03-26 11:31:53 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-04-18 19:32:48 -0400 |
commit | f6b4557c98121e5571c484b037897130d898287c (patch) | |
tree | aa4121e078533a10c6a6481124f32fa8f89e0853 /drivers/scsi/cxlflash/ocxl_hw.h | |
parent | 41df40d817781c9052c8755b612479445e5db638 (diff) | |
download | linux-stable-f6b4557c98121e5571c484b037897130d898287c.tar.gz linux-stable-f6b4557c98121e5571c484b037897130d898287c.tar.bz2 linux-stable-f6b4557c98121e5571c484b037897130d898287c.zip |
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 <ukrishn@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxlflash/ocxl_hw.h')
-rw-r--r-- | drivers/scsi/cxlflash/ocxl_hw.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ +}; |