[SCSI] bfa: add ioc state checking
authorJing Huang <huangj@brocade.com>
Fri, 9 Jul 2010 03:00:24 +0000 (20:00 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 27 Jul 2010 17:04:23 +0000 (12:04 -0500)
This patch adds ioc state checking while enabling a port.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/bfa/bfa_fcport.c

index c855e225af16ffb23887331e4d4b31f5e0450cc1..f0933d8d1eda00fee48afe16044a77cb424a2b46 100644 (file)
@@ -1393,6 +1393,9 @@ bfa_fcport_enable(struct bfa_s *bfa)
                return BFA_STATUS_PBC;
        }
 
+       if (bfa_ioc_is_disabled(&bfa->ioc))
+               return BFA_STATUS_IOC_DISABLED;
+
        if (fcport->diag_busy)
                return BFA_STATUS_DIAG_BUSY;
        else if (bfa_sm_cmp_state