diff options
Diffstat (limited to 'drivers/scsi/bfa/bfa_iocfc.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_iocfc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfa_iocfc.c b/drivers/scsi/bfa/bfa_iocfc.c index 6677f83f2c99..a76de2669bfc 100644 --- a/drivers/scsi/bfa/bfa_iocfc.c +++ b/drivers/scsi/bfa/bfa_iocfc.c | |||
@@ -801,6 +801,11 @@ bfa_iocfc_get_stats(struct bfa_s *bfa, struct bfa_iocfc_stats_s *stats, | |||
801 | return BFA_STATUS_DEVBUSY; | 801 | return BFA_STATUS_DEVBUSY; |
802 | } | 802 | } |
803 | 803 | ||
804 | if (!bfa_iocfc_is_operational(bfa)) { | ||
805 | bfa_trc(bfa, 0); | ||
806 | return BFA_STATUS_IOC_NON_OP; | ||
807 | } | ||
808 | |||
804 | iocfc->stats_busy = BFA_TRUE; | 809 | iocfc->stats_busy = BFA_TRUE; |
805 | iocfc->stats_ret = stats; | 810 | iocfc->stats_ret = stats; |
806 | iocfc->stats_cbfn = cbfn; | 811 | iocfc->stats_cbfn = cbfn; |
@@ -821,6 +826,11 @@ bfa_iocfc_clear_stats(struct bfa_s *bfa, bfa_cb_ioc_t cbfn, void *cbarg) | |||
821 | return BFA_STATUS_DEVBUSY; | 826 | return BFA_STATUS_DEVBUSY; |
822 | } | 827 | } |
823 | 828 | ||
829 | if (!bfa_iocfc_is_operational(bfa)) { | ||
830 | bfa_trc(bfa, 0); | ||
831 | return BFA_STATUS_IOC_NON_OP; | ||
832 | } | ||
833 | |||
824 | iocfc->stats_busy = BFA_TRUE; | 834 | iocfc->stats_busy = BFA_TRUE; |
825 | iocfc->stats_cbfn = cbfn; | 835 | iocfc->stats_cbfn = cbfn; |
826 | iocfc->stats_cbarg = cbarg; | 836 | iocfc->stats_cbarg = cbarg; |