1
0
Fork 0

[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>
hifive-unleashed-5.1
Jayamohan Kallickal 2013-04-05 20:38:33 -07:00 committed by James Bottomley
parent a7909b396b
commit cf6e3c6444
1 changed files with 7 additions and 0 deletions

View File

@ -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,