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:34:03 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-18 19:32:49 -0400
commit56f1db1a2a0c1ba4da0b970f211154b7781c725a (patch)
tree382da0f621309b1bbfcab52a65d3acc8da65824a /drivers/scsi/cxlflash/ocxl_hw.h
parent762c7e9332584d2d7aa645c24dda190d3be8d5f9 (diff)
scsi: cxlflash: Support adapter context polling
The cxlflash userspace API requires that users be able to poll the adapter context for any pending events or interrupts from the AFU. Support polling on various events by implementing the AFU poll fop using a waitqueue. 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 2eb53901daf3..acd280135989 100644
--- a/drivers/scsi/cxlflash/ocxl_hw.h
+++ b/drivers/scsi/cxlflash/ocxl_hw.h
@@ -56,6 +56,8 @@ struct ocxlflash_context {
u64 psn_size; /* Process mapping size */
spinlock_t slock; /* Protects irq/fault/event updates */
+ wait_queue_head_t wq; /* Wait queue for poll and interrupts */
+
struct ocxlflash_irqs *irqs; /* Pointer to array of structures */
int num_irqs; /* Number of interrupts */
bool pending_irq; /* Pending interrupt on the context */