diff options
author | Jitendra Bhivare <jitendra.bhivare@broadcom.com> | 2016-12-13 11:26:03 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-01-05 06:21:13 +0100 |
commit | 413f365657a8b9669bd0ba3628e9fde9ce63604e (patch) | |
tree | 905d5ef41f0c20ef0021aff2e492b6cbefbcad11 /drivers/scsi/be2iscsi/be_main.h | |
parent | scsi: be2iscsi: Remove wq_name from beiscsi_hba (diff) | |
download | linux-413f365657a8b9669bd0ba3628e9fde9ce63604e.tar.xz linux-413f365657a8b9669bd0ba3628e9fde9ce63604e.zip |
scsi: be2iscsi: Add checks to validate CID alloc/free
Set CID slot to 0xffff to indicate empty.
Check if connection already exists in conn_table before binding.
Check if endpoint already NULL before putting back CID.
Break ep->conn link in free_ep to ignore completions after freeing.
Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.h')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h index 30379de98dcb..02a9b2d0d643 100644 --- a/drivers/scsi/be2iscsi/be_main.h +++ b/drivers/scsi/be2iscsi/be_main.h @@ -343,6 +343,7 @@ struct beiscsi_hba { spinlock_t async_pdu_lock; struct list_head hba_queue; #define BE_MAX_SESSION 2048 +#define BE_INVALID_CID 0xffff #define BE_SET_CID_TO_CRI(cri_index, cid) \ (phba->cid_to_cri_map[cid] = cri_index) #define BE_GET_CRI_FROM_CID(cid) (phba->cid_to_cri_map[cid]) |