Lines Matching refs:itnim
19 static void bfa_itnim_update_del_itn_stats(struct bfa_itnim_s *itnim);
140 bfa_itnim_tskdone((__tskim)->itnim); \
159 static void bfa_itnim_iocdisable_cleanup(struct bfa_itnim_s *itnim);
160 static bfa_boolean_t bfa_itnim_send_fwcreate(struct bfa_itnim_s *itnim);
161 static bfa_boolean_t bfa_itnim_send_fwdelete(struct bfa_itnim_s *itnim);
163 static void bfa_itnim_cleanup(struct bfa_itnim_s *itnim);
167 static void bfa_itnim_iotov_online(struct bfa_itnim_s *itnim);
168 static void bfa_itnim_iotov_cleanup(struct bfa_itnim_s *itnim);
170 static void bfa_itnim_iotov_start(struct bfa_itnim_s *itnim);
171 static void bfa_itnim_iotov_stop(struct bfa_itnim_s *itnim);
172 static void bfa_itnim_iotov_delete(struct bfa_itnim_s *itnim);
177 static void bfa_itnim_sm_uninit(struct bfa_itnim_s *itnim,
179 static void bfa_itnim_sm_created(struct bfa_itnim_s *itnim,
181 static void bfa_itnim_sm_fwcreate(struct bfa_itnim_s *itnim,
183 static void bfa_itnim_sm_delete_pending(struct bfa_itnim_s *itnim,
185 static void bfa_itnim_sm_online(struct bfa_itnim_s *itnim,
187 static void bfa_itnim_sm_sler(struct bfa_itnim_s *itnim,
189 static void bfa_itnim_sm_cleanup_offline(struct bfa_itnim_s *itnim,
191 static void bfa_itnim_sm_cleanup_delete(struct bfa_itnim_s *itnim,
193 static void bfa_itnim_sm_fwdelete(struct bfa_itnim_s *itnim,
195 static void bfa_itnim_sm_offline(struct bfa_itnim_s *itnim,
197 static void bfa_itnim_sm_iocdisable(struct bfa_itnim_s *itnim,
199 static void bfa_itnim_sm_deleting(struct bfa_itnim_s *itnim,
201 static void bfa_itnim_sm_fwcreate_qfull(struct bfa_itnim_s *itnim,
203 static void bfa_itnim_sm_fwdelete_qfull(struct bfa_itnim_s *itnim,
205 static void bfa_itnim_sm_deleting_qfull(struct bfa_itnim_s *itnim,
337 struct bfa_itnim_s *itnim; in bfa_fcpim_iocdisable() local
344 itnim = (struct bfa_itnim_s *) qe; in bfa_fcpim_iocdisable()
345 bfa_itnim_iocdisable(itnim); in bfa_fcpim_iocdisable()
426 struct bfa_itnim_s *itnim; in bfa_fcpim_port_iostats() local
431 itnim = (struct bfa_itnim_s *) qe; in bfa_fcpim_port_iostats()
432 if (itnim->rport->rport_info.lp_tag != lp_tag) in bfa_fcpim_port_iostats()
434 bfa_fcpim_add_stats(stats, &(itnim->stats)); in bfa_fcpim_port_iostats()
443 &(ioim->itnim->ioprofile.io_latency); in bfa_ioim_profile_comp()
448 bfa_itnim_ioprofile_update(ioim->itnim, idx); in bfa_ioim_profile_comp()
465 struct bfa_itnim_s *itnim; in bfa_fcpim_profile_on() local
471 itnim = (struct bfa_itnim_s *) qe; in bfa_fcpim_profile_on()
472 bfa_itnim_clear_stats(itnim); in bfa_fcpim_profile_on()
508 bfa_itnim_sm_uninit(struct bfa_itnim_s *itnim, enum bfa_itnim_event event) in bfa_itnim_sm_uninit() argument
510 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_uninit()
511 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_uninit()
515 bfa_sm_set_state(itnim, bfa_itnim_sm_created); in bfa_itnim_sm_uninit()
516 itnim->is_online = BFA_FALSE; in bfa_itnim_sm_uninit()
517 bfa_fcpim_additn(itnim); in bfa_itnim_sm_uninit()
521 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_uninit()
529 bfa_itnim_sm_created(struct bfa_itnim_s *itnim, enum bfa_itnim_event event) in bfa_itnim_sm_created() argument
531 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_created()
532 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_created()
536 if (bfa_itnim_send_fwcreate(itnim)) in bfa_itnim_sm_created()
537 bfa_sm_set_state(itnim, bfa_itnim_sm_fwcreate); in bfa_itnim_sm_created()
539 bfa_sm_set_state(itnim, bfa_itnim_sm_fwcreate_qfull); in bfa_itnim_sm_created()
543 bfa_sm_set_state(itnim, bfa_itnim_sm_uninit); in bfa_itnim_sm_created()
544 bfa_fcpim_delitn(itnim); in bfa_itnim_sm_created()
548 bfa_sm_set_state(itnim, bfa_itnim_sm_iocdisable); in bfa_itnim_sm_created()
552 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_created()
560 bfa_itnim_sm_fwcreate(struct bfa_itnim_s *itnim, enum bfa_itnim_event event) in bfa_itnim_sm_fwcreate() argument
562 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_fwcreate()
563 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_fwcreate()
567 bfa_sm_set_state(itnim, bfa_itnim_sm_online); in bfa_itnim_sm_fwcreate()
568 itnim->is_online = BFA_TRUE; in bfa_itnim_sm_fwcreate()
569 bfa_itnim_iotov_online(itnim); in bfa_itnim_sm_fwcreate()
570 bfa_itnim_online_cb(itnim); in bfa_itnim_sm_fwcreate()
574 bfa_sm_set_state(itnim, bfa_itnim_sm_delete_pending); in bfa_itnim_sm_fwcreate()
578 if (bfa_itnim_send_fwdelete(itnim)) in bfa_itnim_sm_fwcreate()
579 bfa_sm_set_state(itnim, bfa_itnim_sm_fwdelete); in bfa_itnim_sm_fwcreate()
581 bfa_sm_set_state(itnim, bfa_itnim_sm_fwdelete_qfull); in bfa_itnim_sm_fwcreate()
585 bfa_sm_set_state(itnim, bfa_itnim_sm_iocdisable); in bfa_itnim_sm_fwcreate()
589 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_fwcreate()
594 bfa_itnim_sm_fwcreate_qfull(struct bfa_itnim_s *itnim, in bfa_itnim_sm_fwcreate_qfull() argument
597 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_fwcreate_qfull()
598 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_fwcreate_qfull()
602 bfa_sm_set_state(itnim, bfa_itnim_sm_fwcreate); in bfa_itnim_sm_fwcreate_qfull()
603 bfa_itnim_send_fwcreate(itnim); in bfa_itnim_sm_fwcreate_qfull()
607 bfa_sm_set_state(itnim, bfa_itnim_sm_uninit); in bfa_itnim_sm_fwcreate_qfull()
608 bfa_reqq_wcancel(&itnim->reqq_wait); in bfa_itnim_sm_fwcreate_qfull()
609 bfa_fcpim_delitn(itnim); in bfa_itnim_sm_fwcreate_qfull()
613 bfa_sm_set_state(itnim, bfa_itnim_sm_offline); in bfa_itnim_sm_fwcreate_qfull()
614 bfa_reqq_wcancel(&itnim->reqq_wait); in bfa_itnim_sm_fwcreate_qfull()
615 bfa_itnim_offline_cb(itnim); in bfa_itnim_sm_fwcreate_qfull()
619 bfa_sm_set_state(itnim, bfa_itnim_sm_iocdisable); in bfa_itnim_sm_fwcreate_qfull()
620 bfa_reqq_wcancel(&itnim->reqq_wait); in bfa_itnim_sm_fwcreate_qfull()
624 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_fwcreate_qfull()
632 bfa_itnim_sm_delete_pending(struct bfa_itnim_s *itnim, in bfa_itnim_sm_delete_pending() argument
635 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_delete_pending()
636 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_delete_pending()
640 if (bfa_itnim_send_fwdelete(itnim)) in bfa_itnim_sm_delete_pending()
641 bfa_sm_set_state(itnim, bfa_itnim_sm_deleting); in bfa_itnim_sm_delete_pending()
643 bfa_sm_set_state(itnim, bfa_itnim_sm_deleting_qfull); in bfa_itnim_sm_delete_pending()
647 bfa_sm_set_state(itnim, bfa_itnim_sm_uninit); in bfa_itnim_sm_delete_pending()
648 bfa_fcpim_delitn(itnim); in bfa_itnim_sm_delete_pending()
652 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_delete_pending()
660 bfa_itnim_sm_online(struct bfa_itnim_s *itnim, enum bfa_itnim_event event) in bfa_itnim_sm_online() argument
662 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_online()
663 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_online()
667 bfa_sm_set_state(itnim, bfa_itnim_sm_cleanup_offline); in bfa_itnim_sm_online()
668 itnim->is_online = BFA_FALSE; in bfa_itnim_sm_online()
669 bfa_itnim_iotov_start(itnim); in bfa_itnim_sm_online()
670 bfa_itnim_cleanup(itnim); in bfa_itnim_sm_online()
674 bfa_sm_set_state(itnim, bfa_itnim_sm_cleanup_delete); in bfa_itnim_sm_online()
675 itnim->is_online = BFA_FALSE; in bfa_itnim_sm_online()
676 bfa_itnim_cleanup(itnim); in bfa_itnim_sm_online()
680 bfa_sm_set_state(itnim, bfa_itnim_sm_sler); in bfa_itnim_sm_online()
681 itnim->is_online = BFA_FALSE; in bfa_itnim_sm_online()
682 bfa_itnim_iotov_start(itnim); in bfa_itnim_sm_online()
683 bfa_itnim_sler_cb(itnim); in bfa_itnim_sm_online()
687 bfa_sm_set_state(itnim, bfa_itnim_sm_iocdisable); in bfa_itnim_sm_online()
688 itnim->is_online = BFA_FALSE; in bfa_itnim_sm_online()
689 bfa_itnim_iotov_start(itnim); in bfa_itnim_sm_online()
690 bfa_itnim_iocdisable_cleanup(itnim); in bfa_itnim_sm_online()
694 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_online()
702 bfa_itnim_sm_sler(struct bfa_itnim_s *itnim, enum bfa_itnim_event event) in bfa_itnim_sm_sler() argument
704 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_sler()
705 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_sler()
709 bfa_sm_set_state(itnim, bfa_itnim_sm_cleanup_offline); in bfa_itnim_sm_sler()
710 bfa_itnim_cleanup(itnim); in bfa_itnim_sm_sler()
714 bfa_sm_set_state(itnim, bfa_itnim_sm_cleanup_delete); in bfa_itnim_sm_sler()
715 bfa_itnim_cleanup(itnim); in bfa_itnim_sm_sler()
716 bfa_itnim_iotov_delete(itnim); in bfa_itnim_sm_sler()
720 bfa_sm_set_state(itnim, bfa_itnim_sm_iocdisable); in bfa_itnim_sm_sler()
721 bfa_itnim_iocdisable_cleanup(itnim); in bfa_itnim_sm_sler()
725 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_sler()
733 bfa_itnim_sm_cleanup_offline(struct bfa_itnim_s *itnim, in bfa_itnim_sm_cleanup_offline() argument
736 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_cleanup_offline()
737 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_cleanup_offline()
741 if (bfa_itnim_send_fwdelete(itnim)) in bfa_itnim_sm_cleanup_offline()
742 bfa_sm_set_state(itnim, bfa_itnim_sm_fwdelete); in bfa_itnim_sm_cleanup_offline()
744 bfa_sm_set_state(itnim, bfa_itnim_sm_fwdelete_qfull); in bfa_itnim_sm_cleanup_offline()
748 bfa_sm_set_state(itnim, bfa_itnim_sm_cleanup_delete); in bfa_itnim_sm_cleanup_offline()
749 bfa_itnim_iotov_delete(itnim); in bfa_itnim_sm_cleanup_offline()
753 bfa_sm_set_state(itnim, bfa_itnim_sm_iocdisable); in bfa_itnim_sm_cleanup_offline()
754 bfa_itnim_iocdisable_cleanup(itnim); in bfa_itnim_sm_cleanup_offline()
755 bfa_itnim_offline_cb(itnim); in bfa_itnim_sm_cleanup_offline()
762 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_cleanup_offline()
770 bfa_itnim_sm_cleanup_delete(struct bfa_itnim_s *itnim, in bfa_itnim_sm_cleanup_delete() argument
773 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_cleanup_delete()
774 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_cleanup_delete()
778 if (bfa_itnim_send_fwdelete(itnim)) in bfa_itnim_sm_cleanup_delete()
779 bfa_sm_set_state(itnim, bfa_itnim_sm_deleting); in bfa_itnim_sm_cleanup_delete()
781 bfa_sm_set_state(itnim, bfa_itnim_sm_deleting_qfull); in bfa_itnim_sm_cleanup_delete()
785 bfa_sm_set_state(itnim, bfa_itnim_sm_iocdisable); in bfa_itnim_sm_cleanup_delete()
786 bfa_itnim_iocdisable_cleanup(itnim); in bfa_itnim_sm_cleanup_delete()
790 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_cleanup_delete()
798 bfa_itnim_sm_fwdelete(struct bfa_itnim_s *itnim, enum bfa_itnim_event event) in bfa_itnim_sm_fwdelete() argument
800 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_fwdelete()
801 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_fwdelete()
805 bfa_sm_set_state(itnim, bfa_itnim_sm_offline); in bfa_itnim_sm_fwdelete()
806 bfa_itnim_offline_cb(itnim); in bfa_itnim_sm_fwdelete()
810 bfa_sm_set_state(itnim, bfa_itnim_sm_deleting); in bfa_itnim_sm_fwdelete()
814 bfa_sm_set_state(itnim, bfa_itnim_sm_iocdisable); in bfa_itnim_sm_fwdelete()
815 bfa_itnim_offline_cb(itnim); in bfa_itnim_sm_fwdelete()
819 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_fwdelete()
824 bfa_itnim_sm_fwdelete_qfull(struct bfa_itnim_s *itnim, in bfa_itnim_sm_fwdelete_qfull() argument
827 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_fwdelete_qfull()
828 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_fwdelete_qfull()
832 bfa_sm_set_state(itnim, bfa_itnim_sm_fwdelete); in bfa_itnim_sm_fwdelete_qfull()
833 bfa_itnim_send_fwdelete(itnim); in bfa_itnim_sm_fwdelete_qfull()
837 bfa_sm_set_state(itnim, bfa_itnim_sm_deleting_qfull); in bfa_itnim_sm_fwdelete_qfull()
841 bfa_sm_set_state(itnim, bfa_itnim_sm_iocdisable); in bfa_itnim_sm_fwdelete_qfull()
842 bfa_reqq_wcancel(&itnim->reqq_wait); in bfa_itnim_sm_fwdelete_qfull()
843 bfa_itnim_offline_cb(itnim); in bfa_itnim_sm_fwdelete_qfull()
847 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_fwdelete_qfull()
855 bfa_itnim_sm_offline(struct bfa_itnim_s *itnim, enum bfa_itnim_event event) in bfa_itnim_sm_offline() argument
857 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_offline()
858 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_offline()
862 bfa_sm_set_state(itnim, bfa_itnim_sm_uninit); in bfa_itnim_sm_offline()
863 bfa_itnim_iotov_delete(itnim); in bfa_itnim_sm_offline()
864 bfa_fcpim_delitn(itnim); in bfa_itnim_sm_offline()
868 if (bfa_itnim_send_fwcreate(itnim)) in bfa_itnim_sm_offline()
869 bfa_sm_set_state(itnim, bfa_itnim_sm_fwcreate); in bfa_itnim_sm_offline()
871 bfa_sm_set_state(itnim, bfa_itnim_sm_fwcreate_qfull); in bfa_itnim_sm_offline()
875 bfa_sm_set_state(itnim, bfa_itnim_sm_iocdisable); in bfa_itnim_sm_offline()
879 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_offline()
884 bfa_itnim_sm_iocdisable(struct bfa_itnim_s *itnim, in bfa_itnim_sm_iocdisable() argument
887 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_iocdisable()
888 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_iocdisable()
892 bfa_sm_set_state(itnim, bfa_itnim_sm_uninit); in bfa_itnim_sm_iocdisable()
893 bfa_itnim_iotov_delete(itnim); in bfa_itnim_sm_iocdisable()
894 bfa_fcpim_delitn(itnim); in bfa_itnim_sm_iocdisable()
898 bfa_itnim_offline_cb(itnim); in bfa_itnim_sm_iocdisable()
902 if (bfa_itnim_send_fwcreate(itnim)) in bfa_itnim_sm_iocdisable()
903 bfa_sm_set_state(itnim, bfa_itnim_sm_fwcreate); in bfa_itnim_sm_iocdisable()
905 bfa_sm_set_state(itnim, bfa_itnim_sm_fwcreate_qfull); in bfa_itnim_sm_iocdisable()
912 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_iocdisable()
920 bfa_itnim_sm_deleting(struct bfa_itnim_s *itnim, enum bfa_itnim_event event) in bfa_itnim_sm_deleting() argument
922 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_deleting()
923 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_deleting()
928 bfa_sm_set_state(itnim, bfa_itnim_sm_uninit); in bfa_itnim_sm_deleting()
929 bfa_fcpim_delitn(itnim); in bfa_itnim_sm_deleting()
933 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_deleting()
938 bfa_itnim_sm_deleting_qfull(struct bfa_itnim_s *itnim, in bfa_itnim_sm_deleting_qfull() argument
941 bfa_trc(itnim->bfa, itnim->rport->rport_tag); in bfa_itnim_sm_deleting_qfull()
942 bfa_trc(itnim->bfa, event); in bfa_itnim_sm_deleting_qfull()
946 bfa_sm_set_state(itnim, bfa_itnim_sm_deleting); in bfa_itnim_sm_deleting_qfull()
947 bfa_itnim_send_fwdelete(itnim); in bfa_itnim_sm_deleting_qfull()
951 bfa_sm_set_state(itnim, bfa_itnim_sm_uninit); in bfa_itnim_sm_deleting_qfull()
952 bfa_reqq_wcancel(&itnim->reqq_wait); in bfa_itnim_sm_deleting_qfull()
953 bfa_fcpim_delitn(itnim); in bfa_itnim_sm_deleting_qfull()
957 bfa_sm_fault(itnim->bfa, event); in bfa_itnim_sm_deleting_qfull()
965 bfa_itnim_iocdisable_cleanup(struct bfa_itnim_s *itnim) in bfa_itnim_iocdisable_cleanup() argument
971 list_for_each_safe(qe, qen, &itnim->tsk_q) { in bfa_itnim_iocdisable_cleanup()
976 list_for_each_safe(qe, qen, &itnim->io_q) { in bfa_itnim_iocdisable_cleanup()
984 list_for_each_safe(qe, qen, &itnim->pending_q) { in bfa_itnim_iocdisable_cleanup()
989 list_for_each_safe(qe, qen, &itnim->io_cleanup_q) { in bfa_itnim_iocdisable_cleanup()
1001 struct bfa_itnim_s *itnim = itnim_cbarg; in bfa_itnim_cleanp_comp() local
1003 bfa_stats(itnim, cleanup_comps); in bfa_itnim_cleanp_comp()
1004 bfa_sm_send_event(itnim, BFA_ITNIM_SM_CLEANUP); in bfa_itnim_cleanp_comp()
1011 bfa_itnim_cleanup(struct bfa_itnim_s *itnim) in bfa_itnim_cleanup() argument
1017 bfa_wc_init(&itnim->wc, bfa_itnim_cleanp_comp, itnim); in bfa_itnim_cleanup()
1019 list_for_each_safe(qe, qen, &itnim->io_q) { in bfa_itnim_cleanup()
1027 list_add_tail(&ioim->qe, &itnim->io_cleanup_q); in bfa_itnim_cleanup()
1029 bfa_wc_up(&itnim->wc); in bfa_itnim_cleanup()
1033 list_for_each_safe(qe, qen, &itnim->tsk_q) { in bfa_itnim_cleanup()
1035 bfa_wc_up(&itnim->wc); in bfa_itnim_cleanup()
1039 bfa_wc_wait(&itnim->wc); in bfa_itnim_cleanup()
1045 struct bfa_itnim_s *itnim = cbarg; in __bfa_cb_itnim_online() local
1048 bfa_cb_itnim_online(itnim->ditn); in __bfa_cb_itnim_online()
1054 struct bfa_itnim_s *itnim = cbarg; in __bfa_cb_itnim_offline() local
1057 bfa_cb_itnim_offline(itnim->ditn); in __bfa_cb_itnim_offline()
1063 struct bfa_itnim_s *itnim = cbarg; in __bfa_cb_itnim_sler() local
1066 bfa_cb_itnim_sler(itnim->ditn); in __bfa_cb_itnim_sler()
1075 struct bfa_itnim_s *itnim = cbarg; in bfa_itnim_qresume() local
1077 bfa_sm_send_event(itnim, BFA_ITNIM_SM_QRESUME); in bfa_itnim_qresume()
1085 bfa_itnim_iodone(struct bfa_itnim_s *itnim) in bfa_itnim_iodone() argument
1087 bfa_wc_down(&itnim->wc); in bfa_itnim_iodone()
1091 bfa_itnim_tskdone(struct bfa_itnim_s *itnim) in bfa_itnim_tskdone() argument
1093 bfa_wc_down(&itnim->wc); in bfa_itnim_tskdone()
1110 struct bfa_itnim_s *itnim; in bfa_itnim_attach() local
1115 itnim = (struct bfa_itnim_s *) bfa_mem_kva_curp(fcp); in bfa_itnim_attach()
1116 fcpim->itnim_arr = itnim; in bfa_itnim_attach()
1118 for (i = 0; i < fcpim->num_itnims; i++, itnim++) { in bfa_itnim_attach()
1119 memset(itnim, 0, sizeof(struct bfa_itnim_s)); in bfa_itnim_attach()
1120 itnim->bfa = bfa; in bfa_itnim_attach()
1121 itnim->fcpim = fcpim; in bfa_itnim_attach()
1122 itnim->reqq = BFA_REQQ_QOS_LO; in bfa_itnim_attach()
1123 itnim->rport = BFA_RPORT_FROM_TAG(bfa, i); in bfa_itnim_attach()
1124 itnim->iotov_active = BFA_FALSE; in bfa_itnim_attach()
1125 bfa_reqq_winit(&itnim->reqq_wait, bfa_itnim_qresume, itnim); in bfa_itnim_attach()
1127 INIT_LIST_HEAD(&itnim->io_q); in bfa_itnim_attach()
1128 INIT_LIST_HEAD(&itnim->io_cleanup_q); in bfa_itnim_attach()
1129 INIT_LIST_HEAD(&itnim->pending_q); in bfa_itnim_attach()
1130 INIT_LIST_HEAD(&itnim->tsk_q); in bfa_itnim_attach()
1131 INIT_LIST_HEAD(&itnim->delay_comp_q); in bfa_itnim_attach()
1133 itnim->ioprofile.io_latency.min[j] = ~0; in bfa_itnim_attach()
1134 bfa_sm_set_state(itnim, bfa_itnim_sm_uninit); in bfa_itnim_attach()
1137 bfa_mem_kva_curp(fcp) = (u8 *) itnim; in bfa_itnim_attach()
1141 bfa_itnim_iocdisable(struct bfa_itnim_s *itnim) in bfa_itnim_iocdisable() argument
1143 bfa_stats(itnim, ioc_disabled); in bfa_itnim_iocdisable()
1144 bfa_sm_send_event(itnim, BFA_ITNIM_SM_HWFAIL); in bfa_itnim_iocdisable()
1148 bfa_itnim_send_fwcreate(struct bfa_itnim_s *itnim) in bfa_itnim_send_fwcreate() argument
1152 itnim->msg_no++; in bfa_itnim_send_fwcreate()
1157 m = bfa_reqq_next(itnim->bfa, itnim->reqq); in bfa_itnim_send_fwcreate()
1159 bfa_reqq_wait(itnim->bfa, itnim->reqq, &itnim->reqq_wait); in bfa_itnim_send_fwcreate()
1164 bfa_fn_lpu(itnim->bfa)); in bfa_itnim_send_fwcreate()
1165 m->fw_handle = itnim->rport->fw_handle; in bfa_itnim_send_fwcreate()
1167 m->seq_rec = itnim->seq_rec; in bfa_itnim_send_fwcreate()
1168 m->msg_no = itnim->msg_no; in bfa_itnim_send_fwcreate()
1169 bfa_stats(itnim, fw_create); in bfa_itnim_send_fwcreate()
1174 bfa_reqq_produce(itnim->bfa, itnim->reqq, m->mh); in bfa_itnim_send_fwcreate()
1179 bfa_itnim_send_fwdelete(struct bfa_itnim_s *itnim) in bfa_itnim_send_fwdelete() argument
1186 m = bfa_reqq_next(itnim->bfa, itnim->reqq); in bfa_itnim_send_fwdelete()
1188 bfa_reqq_wait(itnim->bfa, itnim->reqq, &itnim->reqq_wait); in bfa_itnim_send_fwdelete()
1193 bfa_fn_lpu(itnim->bfa)); in bfa_itnim_send_fwdelete()
1194 m->fw_handle = itnim->rport->fw_handle; in bfa_itnim_send_fwdelete()
1195 bfa_stats(itnim, fw_delete); in bfa_itnim_send_fwdelete()
1200 bfa_reqq_produce(itnim->bfa, itnim->reqq, m->mh); in bfa_itnim_send_fwdelete()
1208 bfa_itnim_delayed_comp(struct bfa_itnim_s *itnim, bfa_boolean_t iotov) in bfa_itnim_delayed_comp() argument
1213 list_for_each_safe(qe, qen, &itnim->delay_comp_q) { in bfa_itnim_delayed_comp()
1223 bfa_itnim_iotov_online(struct bfa_itnim_s *itnim) in bfa_itnim_iotov_online() argument
1227 bfa_itnim_iotov_stop(itnim); in bfa_itnim_iotov_online()
1232 bfa_itnim_delayed_comp(itnim, BFA_FALSE); in bfa_itnim_iotov_online()
1237 while (!list_empty(&itnim->pending_q)) { in bfa_itnim_iotov_online()
1238 bfa_q_deq(&itnim->pending_q, &ioim); in bfa_itnim_iotov_online()
1239 list_add_tail(&ioim->qe, &itnim->io_q); in bfa_itnim_iotov_online()
1248 bfa_itnim_iotov_cleanup(struct bfa_itnim_s *itnim) in bfa_itnim_iotov_cleanup() argument
1255 bfa_itnim_delayed_comp(itnim, BFA_TRUE); in bfa_itnim_iotov_cleanup()
1260 while (!list_empty(&itnim->pending_q)) { in bfa_itnim_iotov_cleanup()
1261 bfa_q_deq(&itnim->pending_q, &ioim); in bfa_itnim_iotov_cleanup()
1273 struct bfa_itnim_s *itnim = itnim_arg; in bfa_itnim_iotov() local
1275 itnim->iotov_active = BFA_FALSE; in bfa_itnim_iotov()
1277 bfa_cb_itnim_tov_begin(itnim->ditn); in bfa_itnim_iotov()
1278 bfa_itnim_iotov_cleanup(itnim); in bfa_itnim_iotov()
1279 bfa_cb_itnim_tov(itnim->ditn); in bfa_itnim_iotov()
1286 bfa_itnim_iotov_start(struct bfa_itnim_s *itnim) in bfa_itnim_iotov_start() argument
1288 if (itnim->fcpim->path_tov > 0) { in bfa_itnim_iotov_start()
1290 itnim->iotov_active = BFA_TRUE; in bfa_itnim_iotov_start()
1291 WARN_ON(!bfa_itnim_hold_io(itnim)); in bfa_itnim_iotov_start()
1292 bfa_timer_start(itnim->bfa, &itnim->timer, in bfa_itnim_iotov_start()
1293 bfa_itnim_iotov, itnim, itnim->fcpim->path_tov); in bfa_itnim_iotov_start()
1301 bfa_itnim_iotov_stop(struct bfa_itnim_s *itnim) in bfa_itnim_iotov_stop() argument
1303 if (itnim->iotov_active) { in bfa_itnim_iotov_stop()
1304 itnim->iotov_active = BFA_FALSE; in bfa_itnim_iotov_stop()
1305 bfa_timer_stop(&itnim->timer); in bfa_itnim_iotov_stop()
1313 bfa_itnim_iotov_delete(struct bfa_itnim_s *itnim) in bfa_itnim_iotov_delete() argument
1317 if (itnim->iotov_active) in bfa_itnim_iotov_delete()
1320 bfa_itnim_iotov_stop(itnim); in bfa_itnim_iotov_delete()
1322 bfa_cb_itnim_tov_begin(itnim->ditn); in bfa_itnim_iotov_delete()
1323 bfa_itnim_iotov_cleanup(itnim); in bfa_itnim_iotov_delete()
1325 bfa_cb_itnim_tov(itnim->ditn); in bfa_itnim_iotov_delete()
1329 bfa_itnim_update_del_itn_stats(struct bfa_itnim_s *itnim) in bfa_itnim_update_del_itn_stats() argument
1331 struct bfa_fcpim_s *fcpim = BFA_FCPIM(itnim->bfa); in bfa_itnim_update_del_itn_stats()
1333 itnim->stats.iocomp_aborted; in bfa_itnim_update_del_itn_stats()
1335 itnim->stats.iocomp_timedout; in bfa_itnim_update_del_itn_stats()
1337 itnim->stats.iocom_sqer_needed; in bfa_itnim_update_del_itn_stats()
1339 itnim->stats.iocom_res_free; in bfa_itnim_update_del_itn_stats()
1341 itnim->stats.iocom_hostabrts; in bfa_itnim_update_del_itn_stats()
1342 fcpim->del_itn_stats.del_itn_total_ios += itnim->stats.total_ios; in bfa_itnim_update_del_itn_stats()
1343 fcpim->del_itn_stats.del_io_iocdowns += itnim->stats.io_iocdowns; in bfa_itnim_update_del_itn_stats()
1344 fcpim->del_itn_stats.del_tm_iocdowns += itnim->stats.tm_iocdowns; in bfa_itnim_update_del_itn_stats()
1359 struct bfa_itnim_s *itnim; in bfa_itnim_isr() local
1367 itnim = BFA_ITNIM_FROM_TAG(fcpim, in bfa_itnim_isr()
1370 bfa_stats(itnim, create_comps); in bfa_itnim_isr()
1371 bfa_sm_send_event(itnim, BFA_ITNIM_SM_FWRSP); in bfa_itnim_isr()
1375 itnim = BFA_ITNIM_FROM_TAG(fcpim, in bfa_itnim_isr()
1378 bfa_stats(itnim, delete_comps); in bfa_itnim_isr()
1379 bfa_sm_send_event(itnim, BFA_ITNIM_SM_FWRSP); in bfa_itnim_isr()
1383 itnim = BFA_ITNIM_FROM_TAG(fcpim, in bfa_itnim_isr()
1385 bfa_stats(itnim, sler_events); in bfa_itnim_isr()
1386 bfa_sm_send_event(itnim, BFA_ITNIM_SM_SLER); in bfa_itnim_isr()
1403 struct bfa_itnim_s *itnim; in bfa_itnim_create() local
1407 itnim = BFA_ITNIM_FROM_TAG(fcpim, rport->rport_tag); in bfa_itnim_create()
1408 WARN_ON(itnim->rport != rport); in bfa_itnim_create()
1410 itnim->ditn = ditn; in bfa_itnim_create()
1412 bfa_stats(itnim, creates); in bfa_itnim_create()
1413 bfa_sm_send_event(itnim, BFA_ITNIM_SM_CREATE); in bfa_itnim_create()
1415 return itnim; in bfa_itnim_create()
1419 bfa_itnim_delete(struct bfa_itnim_s *itnim) in bfa_itnim_delete() argument
1421 bfa_stats(itnim, deletes); in bfa_itnim_delete()
1422 bfa_sm_send_event(itnim, BFA_ITNIM_SM_DELETE); in bfa_itnim_delete()
1426 bfa_itnim_online(struct bfa_itnim_s *itnim, bfa_boolean_t seq_rec) in bfa_itnim_online() argument
1428 itnim->seq_rec = seq_rec; in bfa_itnim_online()
1429 bfa_stats(itnim, onlines); in bfa_itnim_online()
1430 bfa_sm_send_event(itnim, BFA_ITNIM_SM_ONLINE); in bfa_itnim_online()
1434 bfa_itnim_offline(struct bfa_itnim_s *itnim) in bfa_itnim_offline() argument
1436 bfa_stats(itnim, offlines); in bfa_itnim_offline()
1437 bfa_sm_send_event(itnim, BFA_ITNIM_SM_OFFLINE); in bfa_itnim_offline()
1445 bfa_itnim_hold_io(struct bfa_itnim_s *itnim) in bfa_itnim_hold_io() argument
1447 return itnim->fcpim->path_tov && itnim->iotov_active && in bfa_itnim_hold_io()
1448 (bfa_sm_cmp_state(itnim, bfa_itnim_sm_fwcreate) || in bfa_itnim_hold_io()
1449 bfa_sm_cmp_state(itnim, bfa_itnim_sm_sler) || in bfa_itnim_hold_io()
1450 bfa_sm_cmp_state(itnim, bfa_itnim_sm_cleanup_offline) || in bfa_itnim_hold_io()
1451 bfa_sm_cmp_state(itnim, bfa_itnim_sm_fwdelete) || in bfa_itnim_hold_io()
1452 bfa_sm_cmp_state(itnim, bfa_itnim_sm_offline) || in bfa_itnim_hold_io()
1453 bfa_sm_cmp_state(itnim, bfa_itnim_sm_iocdisable)); in bfa_itnim_hold_io()
1459 bfa_itnim_get_ioprofile(struct bfa_itnim_s *itnim, in bfa_itnim_get_ioprofile() argument
1464 if (!itnim) in bfa_itnim_get_ioprofile()
1467 fcpim = BFA_FCPIM(itnim->bfa); in bfa_itnim_get_ioprofile()
1472 itnim->ioprofile.index = BFA_IOBUCKET_MAX; in bfa_itnim_get_ioprofile()
1474 itnim->ioprofile.io_profile_start_time = in bfa_itnim_get_ioprofile()
1475 bfa_io_profile_start_time(itnim->bfa); in bfa_itnim_get_ioprofile()
1476 itnim->ioprofile.clock_res_mul = bfa_io_lat_clock_res_mul; in bfa_itnim_get_ioprofile()
1477 itnim->ioprofile.clock_res_div = bfa_io_lat_clock_res_div; in bfa_itnim_get_ioprofile()
1478 *ioprofile = itnim->ioprofile; in bfa_itnim_get_ioprofile()
1484 bfa_itnim_clear_stats(struct bfa_itnim_s *itnim) in bfa_itnim_clear_stats() argument
1488 if (!itnim) in bfa_itnim_clear_stats()
1491 memset(&itnim->stats, 0, sizeof(itnim->stats)); in bfa_itnim_clear_stats()
1492 memset(&itnim->ioprofile, 0, sizeof(itnim->ioprofile)); in bfa_itnim_clear_stats()
1494 itnim->ioprofile.io_latency.min[j] = ~0; in bfa_itnim_clear_stats()
1509 if (!bfa_itnim_is_online(ioim->itnim)) { in bfa_ioim_sm_uninit()
1510 if (!bfa_itnim_hold_io(ioim->itnim)) { in bfa_ioim_sm_uninit()
1520 &ioim->itnim->pending_q); in bfa_ioim_sm_uninit()
1553 WARN_ON(!bfa_q_is_on_q(&ioim->itnim->pending_q, ioim)); in bfa_ioim_sm_uninit()
1646 bfa_stats(ioim->itnim, qwait); in bfa_ioim_sm_active()
1660 bfa_stats(ioim->itnim, qwait); in bfa_ioim_sm_active()
1716 bfa_stats(ioim->itnim, qwait); in bfa_ioim_sm_cmnd_retry()
1787 bfa_stats(ioim->itnim, qwait); in bfa_ioim_sm_abort()
2161 bfa_stats(ioim->itnim, iocomp_underrun); in __bfa_cb_ioim_comp()
2166 bfa_stats(ioim->itnim, iocomp_overrun); in __bfa_cb_ioim_comp()
2405 bfa_stats(ioim->itnim, path_tov_expired); in __bfa_cb_ioim_pathtov()
2445 struct bfa_itnim_s *itnim = ioim->itnim; in bfa_ioim_send_ioreq() local
2463 bfa_stats(ioim->itnim, qwait); in bfa_ioim_send_ioreq()
2473 m->rport_hdl = ioim->itnim->rport->fw_handle; in bfa_ioim_send_ioreq()
2564 bfa_stats(itnim, input_reqs); in bfa_ioim_send_ioreq()
2565 ioim->itnim->stats.rd_throughput += fcp_dl; in bfa_ioim_send_ioreq()
2569 bfa_stats(itnim, output_reqs); in bfa_ioim_send_ioreq()
2570 ioim->itnim->stats.wr_throughput += fcp_dl; in bfa_ioim_send_ioreq()
2573 bfa_stats(itnim, input_reqs); in bfa_ioim_send_ioreq()
2574 bfa_stats(itnim, output_reqs); in bfa_ioim_send_ioreq()
2579 if (itnim->seq_rec || in bfa_ioim_send_ioreq()
2663 bfa_stats(ioim->itnim, qresumes); in bfa_ioim_qresume()
2679 if (ioim->fcpim->delay_comp && ioim->itnim->iotov_active) { in bfa_ioim_notify_cleanup()
2682 list_add_tail(&ioim->qe, &ioim->itnim->delay_comp_q); in bfa_ioim_notify_cleanup()
2684 bfa_itnim_iodone(ioim->itnim); in bfa_ioim_notify_cleanup()
2693 (!bfa_q_is_on_q(&ioim->itnim->pending_q, ioim))) || in bfa_ioim_is_abortable()
2718 bfa_stats(ioim->itnim, iocom_nexus_abort); in bfa_ioim_delayed_comp()
2801 bfa_stats(ioim->itnim, iocomp_ok); in bfa_ioim_isr()
2809 bfa_stats(ioim->itnim, iocomp_timedout); in bfa_ioim_isr()
2813 bfa_stats(ioim->itnim, iocomp_aborted); in bfa_ioim_isr()
2821 bfa_stats(ioim->itnim, iocom_proto_err); in bfa_ioim_isr()
2827 bfa_stats(ioim->itnim, iocom_sqer_needed); in bfa_ioim_isr()
2833 bfa_stats(ioim->itnim, iocom_res_free); in bfa_ioim_isr()
2838 bfa_stats(ioim->itnim, iocom_hostabrts); in bfa_ioim_isr()
2852 bfa_stats(ioim->itnim, iocom_utags); in bfa_ioim_isr()
2888 bfa_stats(ioim->itnim, io_cleanups); in bfa_ioim_cleanup()
2898 bfa_stats(ioim->itnim, io_tmaborts); in bfa_ioim_cleanup_tm()
2911 bfa_stats(ioim->itnim, io_iocdowns); in bfa_ioim_iocdisable()
2931 struct bfa_itnim_s *itnim, u16 nsges) in bfa_ioim_alloc() argument
2942 bfa_stats(itnim, no_iotags); in bfa_ioim_alloc()
2949 ioim->itnim = itnim; in bfa_ioim_alloc()
2953 bfa_stats(itnim, total_ios); in bfa_ioim_alloc()
2956 list_add_tail(&ioim->qe, &itnim->io_q); in bfa_ioim_alloc()
2970 bfa_stats(ioim->itnim, io_comps); in bfa_ioim_free()
3013 bfa_stats(ioim->itnim, io_aborts); in bfa_ioim_abort()
3040 if (!bfa_itnim_is_online(tskim->itnim)) { in bfa_tskim_sm_uninit()
3049 bfa_stats(tskim->itnim, tm_qwait); in bfa_tskim_sm_uninit()
3050 bfa_reqq_wait(tskim->bfa, tskim->itnim->reqq, in bfa_tskim_sm_uninit()
3079 bfa_stats(tskim->itnim, tm_qwait); in bfa_tskim_sm_active()
3080 bfa_reqq_wait(tskim->bfa, tskim->itnim->reqq, in bfa_tskim_sm_active()
3260 bfa_stats(tskim->itnim, tm_success); in __bfa_cb_tskim_done()
3274 bfa_stats(tskim->itnim, tm_failures); in __bfa_cb_tskim_failed()
3305 struct bfa_itnim_s *itnim = tskim->itnim; in bfa_tskim_gather_ios() local
3316 list_for_each_safe(qe, qen, &itnim->io_q) { in bfa_tskim_gather_ios()
3329 list_for_each_safe(qe, qen, &itnim->pending_q) { in bfa_tskim_gather_ios()
3349 bfa_stats(tskim->itnim, tm_io_comps); in bfa_tskim_cleanp_comp()
3379 struct bfa_itnim_s *itnim = tskim->itnim; in bfa_tskim_send() local
3385 m = bfa_reqq_next(tskim->bfa, itnim->reqq); in bfa_tskim_send()
3396 m->itn_fhdl = tskim->itnim->rport->fw_handle; in bfa_tskim_send()
3404 bfa_reqq_produce(tskim->bfa, itnim->reqq, m->mh); in bfa_tskim_send()
3414 struct bfa_itnim_s *itnim = tskim->itnim; in bfa_tskim_send_abort() local
3420 m = bfa_reqq_next(tskim->bfa, itnim->reqq); in bfa_tskim_send_abort()
3435 bfa_reqq_produce(tskim->bfa, itnim->reqq, m->mh); in bfa_tskim_send_abort()
3447 bfa_stats(tskim->itnim, tm_qresumes); in bfa_tskim_qresume()
3482 bfa_stats(tskim->itnim, tm_iocdowns); in bfa_tskim_iocdisable()
3493 bfa_stats(tskim->itnim, tm_cleanups); in bfa_tskim_cleanup()
3550 bfa_stats(tskim->itnim, tm_cleanup_comps); in bfa_tskim_isr()
3555 bfa_stats(tskim->itnim, tm_fw_rsps); in bfa_tskim_isr()
3578 WARN_ON(!bfa_q_is_on_q_func(&tskim->itnim->tsk_q, &tskim->qe)); in bfa_tskim_free()
3595 bfa_tskim_start(struct bfa_tskim_s *tskim, struct bfa_itnim_s *itnim, in bfa_tskim_start() argument
3599 tskim->itnim = itnim; in bfa_tskim_start()
3604 bfa_stats(itnim, tm_cmnds); in bfa_tskim_start()
3606 list_add_tail(&tskim->qe, &itnim->tsk_q); in bfa_tskim_start()