summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxlflash/ocxl_hw.h
diff options
context:
space:
mode:
authorUma Krishnan <ukrishn@linux.vnet.ibm.com>2018-03-26 18:34:03 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-19 01:32:49 +0200
commit56f1db1a2a0c1ba4da0b970f211154b7781c725a (patch)
tree382da0f621309b1bbfcab52a65d3acc8da65824a /drivers/scsi/cxlflash/ocxl_hw.h
parentscsi: cxlflash: Support starting user contexts (diff)
downloadlinux-56f1db1a2a0c1ba4da0b970f211154b7781c725a.tar.xz
linux-56f1db1a2a0c1ba4da0b970f211154b7781c725a.zip
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 */