[SCSI] be2iscsi: Proper checking of state
authorJayamohan Kallickal <jayamohank@serverengines.com>
Sat, 23 Jan 2010 00:06:52 +0000 (05:36 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 9 Feb 2010 00:34:13 +0000 (18:34 -0600)
This patch adds proper checking of value in for hba state.
We would be adding more states later on

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/be2iscsi/be_iscsi.c

index d5712bc19a7116110ab5f39b6ed46502f0e67998..29a3aaf35f9ff2573c9f39b5f12460766fe91baf 100644 (file)
@@ -561,7 +561,7 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
                return ERR_PTR(ret);
        }
 
-       if (phba->state) {
+       if (phba->state != BE_ADAPTER_UP) {
                ret = -EBUSY;
                SE_DEBUG(DBG_LVL_1, "The Adapter state is Not UP \n");
                return ERR_PTR(ret);