Lines Matching refs:dconf
5808 static void bfa_dconf_sm_uninit(struct bfa_dconf_mod_s *dconf,
5810 static void bfa_dconf_sm_flash_read(struct bfa_dconf_mod_s *dconf,
5812 static void bfa_dconf_sm_ready(struct bfa_dconf_mod_s *dconf,
5814 static void bfa_dconf_sm_dirty(struct bfa_dconf_mod_s *dconf,
5816 static void bfa_dconf_sm_sync(struct bfa_dconf_mod_s *dconf,
5818 static void bfa_dconf_sm_final_sync(struct bfa_dconf_mod_s *dconf,
5820 static void bfa_dconf_sm_iocdown_dirty(struct bfa_dconf_mod_s *dconf,
5823 static void bfa_dconf_cbfn(void *dconf, bfa_status_t status);
5825 static bfa_status_t bfa_dconf_flash_write(struct bfa_dconf_mod_s *dconf);
5832 bfa_dconf_sm_uninit(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event) in bfa_dconf_sm_uninit() argument
5835 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_uninit()
5839 if (dconf->min_cfg) { in bfa_dconf_sm_uninit()
5840 bfa_trc(dconf->bfa, dconf->min_cfg); in bfa_dconf_sm_uninit()
5841 bfa_fsm_send_event(&dconf->bfa->iocfc, in bfa_dconf_sm_uninit()
5845 bfa_sm_set_state(dconf, bfa_dconf_sm_flash_read); in bfa_dconf_sm_uninit()
5846 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_uninit()
5847 bfa_dconf_timer, dconf, 2 * BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_uninit()
5848 bfa_status = bfa_flash_read_part(BFA_FLASH(dconf->bfa), in bfa_dconf_sm_uninit()
5849 BFA_FLASH_PART_DRV, dconf->instance, in bfa_dconf_sm_uninit()
5850 dconf->dconf, in bfa_dconf_sm_uninit()
5852 bfa_dconf_init_cb, dconf->bfa); in bfa_dconf_sm_uninit()
5854 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_uninit()
5855 bfa_dconf_init_cb(dconf->bfa, BFA_STATUS_FAILED); in bfa_dconf_sm_uninit()
5856 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_uninit()
5861 bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); in bfa_dconf_sm_uninit()
5868 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_uninit()
5876 bfa_dconf_sm_flash_read(struct bfa_dconf_mod_s *dconf, in bfa_dconf_sm_flash_read() argument
5879 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_flash_read()
5883 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_flash_read()
5884 bfa_sm_set_state(dconf, bfa_dconf_sm_ready); in bfa_dconf_sm_flash_read()
5887 bfa_sm_set_state(dconf, bfa_dconf_sm_ready); in bfa_dconf_sm_flash_read()
5888 bfa_ioc_suspend(&dconf->bfa->ioc); in bfa_dconf_sm_flash_read()
5891 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_flash_read()
5892 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_flash_read()
5893 bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); in bfa_dconf_sm_flash_read()
5896 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_flash_read()
5897 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_flash_read()
5900 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_flash_read()
5908 bfa_dconf_sm_ready(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event) in bfa_dconf_sm_ready() argument
5910 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_ready()
5914 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_ready()
5915 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_ready()
5916 bfa_sm_set_state(dconf, bfa_dconf_sm_dirty); in bfa_dconf_sm_ready()
5919 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_ready()
5920 bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); in bfa_dconf_sm_ready()
5926 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_ready()
5935 bfa_dconf_sm_dirty(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event) in bfa_dconf_sm_dirty() argument
5937 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_dirty()
5941 bfa_sm_set_state(dconf, bfa_dconf_sm_sync); in bfa_dconf_sm_dirty()
5942 bfa_dconf_flash_write(dconf); in bfa_dconf_sm_dirty()
5945 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_dirty()
5946 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_dirty()
5947 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_dirty()
5950 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_dirty()
5951 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_dirty()
5952 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_dirty()
5953 bfa_sm_set_state(dconf, bfa_dconf_sm_final_sync); in bfa_dconf_sm_dirty()
5954 bfa_dconf_flash_write(dconf); in bfa_dconf_sm_dirty()
5959 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_dirty()
5960 bfa_sm_set_state(dconf, bfa_dconf_sm_iocdown_dirty); in bfa_dconf_sm_dirty()
5963 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_dirty()
5971 bfa_dconf_sm_final_sync(struct bfa_dconf_mod_s *dconf, in bfa_dconf_sm_final_sync() argument
5974 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_final_sync()
5979 bfa_timer_stop(&dconf->timer); in bfa_dconf_sm_final_sync()
5982 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_final_sync()
5983 bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); in bfa_dconf_sm_final_sync()
5986 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_final_sync()
5991 bfa_dconf_sm_sync(struct bfa_dconf_mod_s *dconf, enum bfa_dconf_event event) in bfa_dconf_sm_sync() argument
5993 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_sync()
5997 bfa_sm_set_state(dconf, bfa_dconf_sm_ready); in bfa_dconf_sm_sync()
6000 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_sync()
6001 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_sync()
6002 bfa_sm_set_state(dconf, bfa_dconf_sm_dirty); in bfa_dconf_sm_sync()
6005 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_sync()
6006 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_sync()
6007 bfa_sm_set_state(dconf, bfa_dconf_sm_final_sync); in bfa_dconf_sm_sync()
6010 bfa_sm_set_state(dconf, bfa_dconf_sm_iocdown_dirty); in bfa_dconf_sm_sync()
6013 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_sync()
6018 bfa_dconf_sm_iocdown_dirty(struct bfa_dconf_mod_s *dconf, in bfa_dconf_sm_iocdown_dirty() argument
6021 bfa_trc(dconf->bfa, event); in bfa_dconf_sm_iocdown_dirty()
6025 bfa_timer_start(dconf->bfa, &dconf->timer, in bfa_dconf_sm_iocdown_dirty()
6026 bfa_dconf_timer, dconf, BFA_DCONF_UPDATE_TOV); in bfa_dconf_sm_iocdown_dirty()
6027 bfa_sm_set_state(dconf, bfa_dconf_sm_dirty); in bfa_dconf_sm_iocdown_dirty()
6030 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_sm_iocdown_dirty()
6031 bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE); in bfa_dconf_sm_iocdown_dirty()
6036 bfa_sm_fault(dconf->bfa, event); in bfa_dconf_sm_iocdown_dirty()
6060 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_attach() local
6062 dconf->bfad = bfad; in bfa_dconf_attach()
6063 dconf->bfa = bfa; in bfa_dconf_attach()
6064 dconf->instance = bfa->ioc.port_id; in bfa_dconf_attach()
6065 bfa_trc(bfa, dconf->instance); in bfa_dconf_attach()
6067 dconf->dconf = (struct bfa_dconf_s *) bfa_mem_kva_curp(dconf); in bfa_dconf_attach()
6069 bfa_mem_kva_curp(dconf) += sizeof(struct bfa_dconf_hdr_s); in bfa_dconf_attach()
6070 dconf->min_cfg = BFA_TRUE; in bfa_dconf_attach()
6072 dconf->min_cfg = BFA_FALSE; in bfa_dconf_attach()
6073 bfa_mem_kva_curp(dconf) += sizeof(struct bfa_dconf_s); in bfa_dconf_attach()
6077 bfa_sm_set_state(dconf, bfa_dconf_sm_uninit); in bfa_dconf_attach()
6084 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_init_cb() local
6088 if (dconf->dconf->hdr.signature != BFI_DCONF_SIGNATURE) in bfa_dconf_init_cb()
6089 dconf->dconf->hdr.signature = BFI_DCONF_SIGNATURE; in bfa_dconf_init_cb()
6090 if (dconf->dconf->hdr.version != BFI_DCONF_VERSION) in bfa_dconf_init_cb()
6091 dconf->dconf->hdr.version = BFI_DCONF_VERSION; in bfa_dconf_init_cb()
6093 bfa_sm_send_event(dconf, BFA_DCONF_SM_FLASH_COMP); in bfa_dconf_init_cb()
6100 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_modinit() local
6101 bfa_sm_send_event(dconf, BFA_DCONF_SM_INIT); in bfa_dconf_modinit()
6106 struct bfa_dconf_mod_s *dconf = cbarg; in bfa_dconf_timer() local
6107 bfa_sm_send_event(dconf, BFA_DCONF_SM_TIMEOUT); in bfa_dconf_timer()
6113 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_iocdisable() local
6114 bfa_sm_send_event(dconf, BFA_DCONF_SM_IOCDISABLE); in bfa_dconf_iocdisable()
6118 bfa_dconf_flash_write(struct bfa_dconf_mod_s *dconf) in bfa_dconf_flash_write() argument
6121 bfa_trc(dconf->bfa, 0); in bfa_dconf_flash_write()
6123 bfa_status = bfa_flash_update_part(BFA_FLASH(dconf->bfa), in bfa_dconf_flash_write()
6124 BFA_FLASH_PART_DRV, dconf->instance, in bfa_dconf_flash_write()
6125 dconf->dconf, sizeof(struct bfa_dconf_s), 0, in bfa_dconf_flash_write()
6126 bfa_dconf_cbfn, dconf); in bfa_dconf_flash_write()
6129 bfa_trc(dconf->bfa, bfa_status); in bfa_dconf_flash_write()
6137 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_update() local
6138 bfa_trc(dconf->bfa, 0); in bfa_dconf_update()
6139 if (bfa_sm_cmp_state(dconf, bfa_dconf_sm_iocdown_dirty)) in bfa_dconf_update()
6142 if (dconf->min_cfg) { in bfa_dconf_update()
6143 bfa_trc(dconf->bfa, dconf->min_cfg); in bfa_dconf_update()
6147 bfa_sm_send_event(dconf, BFA_DCONF_SM_WR); in bfa_dconf_update()
6154 struct bfa_dconf_mod_s *dconf = arg; in bfa_dconf_cbfn() local
6156 bfa_sm_send_event(dconf, BFA_DCONF_SM_FLASH_COMP); in bfa_dconf_cbfn()
6162 struct bfa_dconf_mod_s *dconf = BFA_DCONF_MOD(bfa); in bfa_dconf_modexit() local
6163 bfa_sm_send_event(dconf, BFA_DCONF_SM_EXIT); in bfa_dconf_modexit()