aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohank@gmail.com>2013-04-05 23:38:33 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-05-02 11:15:54 -0400
commitcf6e3c6444edfeaea65994709e5cdf3f337625d4 (patch)
tree0ad696d4567448a1853a960c921270fc40dac3ae
parenta7909b396ba79a5d2975d37fe60e1ad53c22e206 (diff)
[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 <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>
-rw-r--r--drivers/scsi/be2iscsi/be_iscsi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index 1bf0285061ff..33db49b8e5c3 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,
1128 return ERR_PTR(ret); 1128 return ERR_PTR(ret);
1129 } 1129 }
1130 1130
1131 if (beiscsi_error(phba)) {
1132 ret = -EIO;
1133 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
1134 "BS_%d : The FW state Not Stable!!!\n");
1135 return ERR_PTR(ret);
1136 }
1137
1131 if (phba->state != BE_ADAPTER_UP) { 1138 if (phba->state != BE_ADAPTER_UP) {
1132 ret = -EBUSY; 1139 ret = -EBUSY;
1133 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, 1140 beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,