summaryrefslogtreecommitdiff
path: root/drivers/scsi/cxlflash/ocxl_hw.h
diff options
context:
space:
mode:
authorUma Krishnan <ukrishn@linux.vnet.ibm.com>2018-03-26 11:32:00 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-18 19:32:48 -0400
commit429ebfa69b8a456194cd424772dace40b1c3f963 (patch)
tree836a76df50353bb4bbb40f94f3700714f520db2e /drivers/scsi/cxlflash/ocxl_hw.h
parentf6b4557c98121e5571c484b037897130d898287c (diff)
scsi: cxlflash: Use IDR to manage adapter contexts
A range of PASIDs are used as identifiers for the adapter contexts. These contexts may be destroyed and created randomly. Use an IDR to keep track of contexts that are in use and assign a unique identifier to new ones. 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.h')
-rw-r--r--drivers/scsi/cxlflash/ocxl_hw.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/cxlflash/ocxl_hw.h b/drivers/scsi/cxlflash/ocxl_hw.h
index f41ba0ba23c6..a5337b62a557 100644
--- a/drivers/scsi/cxlflash/ocxl_hw.h
+++ b/drivers/scsi/cxlflash/ocxl_hw.h
@@ -26,6 +26,7 @@ struct ocxl_hw_afu {
int afu_actag_base; /* AFU acTag base */
int afu_actag_enabled; /* AFU acTag number enabled */
+ struct idr idr; /* IDR to manage contexts */
int max_pasid; /* Maximum number of contexts */
bool is_present; /* Function has AFUs defined */
};
@@ -33,4 +34,5 @@ struct ocxl_hw_afu {
struct ocxlflash_context {
struct ocxl_hw_afu *hw_afu; /* HW AFU back pointer */
bool master; /* Whether this is a master context */
+ int pe; /* Process element */
};