[SCSI] be2iscsi: Fix freeing CXN specific driver resources.

Free CXN specific resource held by driver when login redirection
or connection retry happens. Login redirection was failing
because WRB/SGL were not allocated from the CID on which
doorbell was rung.

Fixed the issue raised by MikeC

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Цей коміт міститься в:
Jayamohan Kallickal
2013-04-05 20:38:25 -07:00
зафіксовано James Bottomley
джерело bf9131cbb8
коміт 43f388b02e
3 змінених файлів з 62 додано та 22 видалено

Переглянути файл

@@ -990,9 +990,24 @@ static void beiscsi_put_cid(struct beiscsi_hba *phba, unsigned short cid)
static void beiscsi_free_ep(struct beiscsi_endpoint *beiscsi_ep)
{
struct beiscsi_hba *phba = beiscsi_ep->phba;
struct beiscsi_conn *beiscsi_conn;
beiscsi_put_cid(phba, beiscsi_ep->ep_cid);
beiscsi_ep->phba = NULL;
/**
* Check if any connection resource allocated by driver
* is to be freed.This case occurs when target redirection
* or connection retry is done.
**/
if (!beiscsi_ep->conn)
return;
beiscsi_conn = beiscsi_ep->conn;
if (beiscsi_conn->login_in_progress) {
beiscsi_free_mgmt_task_handles(beiscsi_conn);
beiscsi_conn->login_in_progress = 0;
}
}
/**