scsi: be2iscsi: Fix closing of connection
authorJitendra Bhivare <jitendra.bhivare@broadcom.com>
Fri, 24 Mar 2017 08:41:41 +0000 (14:11 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 28 Mar 2017 02:03:04 +0000 (22:03 -0400)
commit49fc5152f5904aeab75aaef631ea61dff7ee76d8
tree84af141cb193c76806e1dab9361e732ea2274f0b
parenteb419229be58dc6d4a3a814116a265908e088c39
scsi: be2iscsi: Fix closing of connection

CID needs to be freed even when invalidate or upload connection fails.
Attempt to close connection 3 times before freeing CID.

Set cleanup_type to INVALIDATE instead of force TCP_RST.  This
unnecessarily is terminating connection with reset instead of gracefully
closing it.

Set save_cfg to 0 - session not to be saved on flash.

Add delay and process CQ before uploading connection.

Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/be2iscsi/be.h
drivers/scsi/be2iscsi/be_cmds.h
drivers/scsi/be2iscsi/be_iscsi.c
drivers/scsi/be2iscsi/be_mgmt.c
drivers/scsi/be2iscsi/be_mgmt.h