From: Jayamohan Kallickal Date: Sat, 6 Apr 2013 03:38:33 +0000 (-0700) Subject: [SCSI] be2iscsi: Fix checking Adapter state while establishing CXN X-Git-Tag: v3.10-rc1~3^2~1^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf6e3c6444edfeaea65994709e5cdf3f337625d4;p=profile%2Fivi%2Fkernel-x86-ivi.git [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: John Soni Jose Signed-off-by: Jayamohan Kallickal Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index 1bf0285..33db49b 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -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,