Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf6e3c64 authored by Jayamohan Kallickal's avatar Jayamohan Kallickal Committed by James Bottomley
Browse files

[SCSI] be2iscsi: Fix checking Adapter state while establishing CXN



Before tyring to establish a CXN with the target, check if the adapter is in
a stable state

Signed-off-by: default avatarJohn Soni Jose <sony.john-n@emulex.com>
Signed-off-by: default avatarJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent a7909b39
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1128,6 +1128,13 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
		return ERR_PTR(ret);
	}

	if (beiscsi_error(phba)) {
		ret = -EIO;
		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
			    "BS_%d : The FW state Not Stable!!!\n");
		return ERR_PTR(ret);
	}

	if (phba->state != BE_ADAPTER_UP) {
		ret = -EBUSY;
		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,