aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi/ibmvfc.h
diff options
context:
space:
mode:
authorTyrel Datwyler <tyreld@linux.ibm.com>2021-01-14 14:31:45 -0600
committerMartin K. Petersen <martin.petersen@oracle.com>2021-01-14 22:31:04 -0500
commita835f386f9709504a99346be011da92b5ea905e5 (patch)
tree4e5954381479cbfb105f4c5873de34e99977ac3b /drivers/scsi/ibmvscsi/ibmvfc.h
parentscsi: ibmvfc: Add cancel mad initialization helper (diff)
downloadlinux-dev-a835f386f9709504a99346be011da92b5ea905e5.tar.xz
linux-dev-a835f386f9709504a99346be011da92b5ea905e5.zip
scsi: ibmvfc: Send Cancel MAD down each hw SCSI channel
In general the client needs to send Cancel MADs and task management commands down the same channel as the command(s) intended to cancel or abort. The client assigns cancel keys per LUN and thus must send a Cancel down each channel commands were submitted for that LUN. Further, the client then must wait for those cancel completions prior to submitting a LUN RESET or ABORT TASK SET. Add a cancel rsp iu syncronization field to the ibmvfc_queue struct such that the cancel routine can sync the cancel response to each queue that requires a cancel command. Build a list of each cancel event sent and wait for the completion of each submitted cancel. Link: https://lore.kernel.org/r/20210114203148.246656-19-tyreld@linux.ibm.com Reviewed-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvfc.h')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h
index 2dbce7071409..c3bb83c9d8a6 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.h
+++ b/drivers/scsi/ibmvscsi/ibmvfc.h
@@ -737,6 +737,7 @@ struct ibmvfc_target {
/* a unit of work for the hosting partition */
struct ibmvfc_event {
struct list_head queue_list;
+ struct list_head cancel;
struct ibmvfc_host *vhost;
struct ibmvfc_queue *queue;
struct ibmvfc_target *tgt;
@@ -790,6 +791,8 @@ struct ibmvfc_queue {
struct list_head free;
spinlock_t l_lock;
+ union ibmvfc_iu cancel_rsp;
+
/* Sub-CRQ fields */
struct ibmvfc_host *vhost;
unsigned long cookie;