Lines Matching refs:mlxfw_dev
70 static int mlxfw_fsm_state_wait(struct mlxfw_dev *mlxfw_dev, u32 fwhandle, in mlxfw_fsm_state_wait() argument
80 err = mlxfw_dev->ops->fsm_query_state(mlxfw_dev, fwhandle, in mlxfw_fsm_state_wait()
105 static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev, in mlxfw_flash_component() argument
117 err = mlxfw_dev->ops->component_query(mlxfw_dev, comp->index, in mlxfw_flash_component()
134 err = mlxfw_dev->ops->fsm_component_update(mlxfw_dev, fwhandle, in mlxfw_flash_component()
140 err = mlxfw_fsm_state_wait(mlxfw_dev, fwhandle, in mlxfw_flash_component()
152 err = mlxfw_dev->ops->fsm_block_download(mlxfw_dev, fwhandle, in mlxfw_flash_component()
160 err = mlxfw_dev->ops->fsm_component_verify(mlxfw_dev, fwhandle, in mlxfw_flash_component()
165 err = mlxfw_fsm_state_wait(mlxfw_dev, fwhandle, MLXFW_FSM_STATE_LOCKED); in mlxfw_flash_component()
171 mlxfw_dev->ops->fsm_cancel(mlxfw_dev, fwhandle); in mlxfw_flash_component()
175 static int mlxfw_flash_components(struct mlxfw_dev *mlxfw_dev, u32 fwhandle, in mlxfw_flash_components() argument
182 err = mlxfw_mfa2_file_component_count(mfa2_file, mlxfw_dev->psid, in mlxfw_flash_components()
183 mlxfw_dev->psid_size, in mlxfw_flash_components()
193 comp = mlxfw_mfa2_file_component_get(mfa2_file, mlxfw_dev->psid, in mlxfw_flash_components()
194 mlxfw_dev->psid_size, i); in mlxfw_flash_components()
199 err = mlxfw_flash_component(mlxfw_dev, fwhandle, comp); in mlxfw_flash_components()
207 int mlxfw_firmware_flash(struct mlxfw_dev *mlxfw_dev, in mlxfw_firmware_flash() argument
224 err = mlxfw_dev->ops->fsm_lock(mlxfw_dev, &fwhandle); in mlxfw_firmware_flash()
230 err = mlxfw_fsm_state_wait(mlxfw_dev, fwhandle, in mlxfw_firmware_flash()
235 err = mlxfw_flash_components(mlxfw_dev, fwhandle, mfa2_file); in mlxfw_firmware_flash()
240 err = mlxfw_dev->ops->fsm_activate(mlxfw_dev, fwhandle); in mlxfw_firmware_flash()
246 err = mlxfw_fsm_state_wait(mlxfw_dev, fwhandle, MLXFW_FSM_STATE_LOCKED); in mlxfw_firmware_flash()
251 mlxfw_dev->ops->fsm_release(mlxfw_dev, fwhandle); in mlxfw_firmware_flash()
261 mlxfw_dev->ops->fsm_release(mlxfw_dev, fwhandle); in mlxfw_firmware_flash()