Lines Matching refs:dconf
5827 BFA_MODULE(dconf);
5842 static void bfa_dconf_sm_uninit(struct bfa_dconf_mod_s *dconf,
5844 static void bfa_dconf_sm_flash_read(struct bfa_dconf_mod_s *dconf,
5846 static void bfa_dconf_sm_ready(struct bfa_dconf_mod_s *dconf,
5848 static void bfa_dconf_sm_dirty(struct bfa_dconf_mod_s *dconf,
5850 static void bfa_dconf_sm_sync(struct bfa_dconf_mod_s *dconf,
5852 static void bfa_dconf_sm_final_sync(struct bfa_dconf_mod_s *dconf,
5854 static void bfa_dconf_sm_iocdown_dirty(struct bfa_dconf_mod_s *dconf,
5857 static void bfa_dconf_cbfn(void *dconf, bfa_status_t status);
5859 static bfa_status_t bfa_dconf_flash_write(struct bfa_dconf_mod_s *dconf);
5866 bfa_dconf_sm_uninit(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event) in bfa_dconf_sm_uninit() argument
5869 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_uninit()
5873 if (dconf->min_cfg) { in bfa_dconf_sm_uninit()
5874 bfa_trc(dconf->bfa, dconf->min_cfg); in bfa_dconf_sm_uninit()
5875 bfa_fsm_send_event(&dconf->bfa->iocfc, in bfa_dconf_sm_uninit()
5879 bfa_sm_set_state(dconf, bfa_dconf_sm_flash_read); in bfa_dconf_sm_uninit()
5880 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_uninit()
5881 bfa_dconf_timer, dconf, 2 * BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_uninit()
5882 bfa_status = bfa_flash_read_part(BFA_FLASH(dconf->bfa), in bfa_dconf_sm_uninit()
5883 BFA_FLASH_PART_DRV, dconf->instance, in bfa_dconf_sm_uninit()
5884 dconf->dconf, in bfa_dconf_sm_uninit()
5886 bfa_dconf_init_cb, dconf->bfa); in bfa_dconf_sm_uninit()
5888 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_uninit()
5889 bfa_dconf_init_cb(dconf->bfa, BFA_STATUS_FAILED); in bfa_dconf_sm_uninit()
5890 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_uninit()
5895 bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); in bfa_dconf_sm_uninit()
5901 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_uninit()
5909 bfa_dconf_sm_flash_read(struct bfa_dconf_mod_s *dconf, in bfa_dconf_sm_flash_read() argument
5912 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_flash_read()
5916 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_flash_read()
5917 bfa_sm_set_state(dconf, bfa_dconf_sm_ready); in bfa_dconf_sm_flash_read()
5920 bfa_sm_set_state(dconf, bfa_dconf_sm_ready); in bfa_dconf_sm_flash_read()
5921 bfa_ioc_suspend(&dconf->bfa->ioc); in bfa_dconf_sm_flash_read()
5924 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_flash_read()
5925 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_flash_read()
5926 bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); in bfa_dconf_sm_flash_read()
5929 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_flash_read()
5930 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_flash_read()
5933 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_flash_read()
5941 bfa_dconf_sm_ready(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event) in bfa_dconf_sm_ready() argument
5943 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_ready()
5947 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_ready()
5948 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_ready()
5949 bfa_sm_set_state(dconf, bfa_dconf_sm_dirty); in bfa_dconf_sm_ready()
5952 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_ready()
5953 bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); in bfa_dconf_sm_ready()
5959 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_ready()
5968 bfa_dconf_sm_dirty(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event) in bfa_dconf_sm_dirty() argument
5970 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_dirty()
5974 bfa_sm_set_state(dconf, bfa_dconf_sm_sync); in bfa_dconf_sm_dirty()
5975 bfa_dconf_flash_write(dconf); in bfa_dconf_sm_dirty()
5978 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_dirty()
5979 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_dirty()
5980 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_dirty()
5983 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_dirty()
5984 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_dirty()
5985 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_dirty()
5986 bfa_sm_set_state(dconf, bfa_dconf_sm_final_sync); in bfa_dconf_sm_dirty()
5987 bfa_dconf_flash_write(dconf); in bfa_dconf_sm_dirty()
5992 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_dirty()
5993 bfa_sm_set_state(dconf, bfa_dconf_sm_iocdown_dirty); in bfa_dconf_sm_dirty()
5996 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_dirty()
6004 bfa_dconf_sm_final_sync(struct bfa_dconf_mod_s *dconf, in bfa_dconf_sm_final_sync() argument
6007 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_final_sync()
6012 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_final_sync()
6014 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_final_sync()
6015 bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); in bfa_dconf_sm_final_sync()
6018 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_final_sync()
6023 bfa_dconf_sm_sync(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event) in bfa_dconf_sm_sync() argument
6025 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_sync()
6029 bfa_sm_set_state(dconf, bfa_dconf_sm_ready); in bfa_dconf_sm_sync()
6032 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_sync()
6033 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_sync()
6034 bfa_sm_set_state(dconf, bfa_dconf_sm_dirty); in bfa_dconf_sm_sync()
6037 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_sync()
6038 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_sync()
6039 bfa_sm_set_state(dconf, bfa_dconf_sm_final_sync); in bfa_dconf_sm_sync()
6042 bfa_sm_set_state(dconf, bfa_dconf_sm_iocdown_dirty); in bfa_dconf_sm_sync()
6045 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_sync()
6050 bfa_dconf_sm_iocdown_dirty(struct bfa_dconf_mod_s *dconf, in bfa_dconf_sm_iocdown_dirty() argument
6053 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_iocdown_dirty()
6057 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_iocdown_dirty()
6058 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_iocdown_dirty()
6059 bfa_sm_set_state(dconf, bfa_dconf_sm_dirty); in bfa_dconf_sm_iocdown_dirty()
6062 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_iocdown_dirty()
6063 bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); in bfa_dconf_sm_iocdown_dirty()
6068 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_iocdown_dirty()
6093 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_attach() local
6095 dconf->bfad = bfad; in bfa_dconf_attach()
6096 dconf->bfa = bfa; in bfa_dconf_attach()
6097 dconf->instance = bfa->ioc.port_id; in bfa_dconf_attach()
6098 bfa_trc(bfa, dconf->instance); in bfa_dconf_attach()
6100 dconf->dconf = (struct bfa_dconf_s *) bfa_mem_kva_curp(dconf); in bfa_dconf_attach()
6102 bfa_mem_kva_curp(dconf) += sizeof(struct bfa_dconf_hdr_s); in bfa_dconf_attach()
6103 dconf->min_cfg = BFA_TRUE; in bfa_dconf_attach()
6105 dconf->min_cfg = BFA_FALSE; in bfa_dconf_attach()
6106 bfa_mem_kva_curp(dconf) += sizeof(struct bfa_dconf_s); in bfa_dconf_attach()
6110 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_attach()
6117 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_init_cb() local
6121 if (dconf->dconf->hdr.signature != BFI_DCONF_SIGNATURE) in bfa_dconf_init_cb()
6122 dconf->dconf->hdr.signature = BFI_DCONF_SIGNATURE; in bfa_dconf_init_cb()
6123 if (dconf->dconf->hdr.version != BFI_DCONF_VERSION) in bfa_dconf_init_cb()
6124 dconf->dconf->hdr.version = BFI_DCONF_VERSION; in bfa_dconf_init_cb()
6126 bfa_sm_send_event(dconf, BFA_DCONF_SM_FLASH_COMP); in bfa_dconf_init_cb()
6133 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_modinit() local
6134 bfa_sm_send_event(dconf, BFA_DCONF_SM_INIT); in bfa_dconf_modinit()
6148 struct bfa_dconf_mod_s *dconf = cbarg; in bfa_dconf_timer() local
6149 bfa_sm_send_event(dconf, BFA_DCONF_SM_TIMEOUT); in bfa_dconf_timer()
6154 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_iocdisable() local
6155 bfa_sm_send_event(dconf, BFA_DCONF_SM_IOCDISABLE); in bfa_dconf_iocdisable()
6164 bfa_dconf_flash_write(struct bfa_dconf_mod_s *dconf) in bfa_dconf_flash_write() argument
6167 bfa_trc(dconf->bfa, 0); in bfa_dconf_flash_write()
6169 bfa_status = bfa_flash_update_part(BFA_FLASH(dconf->bfa), in bfa_dconf_flash_write()
6170 BFA_FLASH_PART_DRV, dconf->instance, in bfa_dconf_flash_write()
6171 dconf->dconf, sizeof(struct bfa_dconf_s), 0, in bfa_dconf_flash_write()
6172 bfa_dconf_cbfn, dconf); in bfa_dconf_flash_write()
6175 bfa_trc(dconf->bfa, bfa_status); in bfa_dconf_flash_write()
6183 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_update() local
6184 bfa_trc(dconf->bfa, 0); in bfa_dconf_update()
6185 if (bfa_sm_cmp_state(dconf, bfa_dconf_sm_iocdown_dirty)) in bfa_dconf_update()
6188 if (dconf->min_cfg) { in bfa_dconf_update()
6189 bfa_trc(dconf->bfa, dconf->min_cfg); in bfa_dconf_update()
6193 bfa_sm_send_event(dconf, BFA_DCONF_SM_WR); in bfa_dconf_update()
6200 struct bfa_dconf_mod_s *dconf = arg; in bfa_dconf_cbfn() local
6202 bfa_sm_send_event(dconf, BFA_DCONF_SM_FLASH_COMP); in bfa_dconf_cbfn()
6208 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_modexit() local
6209 bfa_sm_send_event(dconf, BFA_DCONF_SM_EXIT); in bfa_dconf_modexit()