Lines Matching refs:mlxfw_dev

73 static int mlxfw_fsm_state_wait(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,  in mlxfw_fsm_state_wait()  argument
83 err = mlxfw_dev->ops->fsm_query_state(mlxfw_dev, fwhandle, in mlxfw_fsm_state_wait()
108 static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev, in mlxfw_flash_component() argument
120 err = mlxfw_dev->ops->component_query(mlxfw_dev, comp->index, in mlxfw_flash_component()
137 err = mlxfw_dev->ops->fsm_component_update(mlxfw_dev, fwhandle, in mlxfw_flash_component()
143 err = mlxfw_fsm_state_wait(mlxfw_dev, fwhandle, in mlxfw_flash_component()
155 err = mlxfw_dev->ops->fsm_block_download(mlxfw_dev, fwhandle, in mlxfw_flash_component()
163 err = mlxfw_dev->ops->fsm_component_verify(mlxfw_dev, fwhandle, in mlxfw_flash_component()
168 err = mlxfw_fsm_state_wait(mlxfw_dev, fwhandle, MLXFW_FSM_STATE_LOCKED); in mlxfw_flash_component()
174 mlxfw_dev->ops->fsm_cancel(mlxfw_dev, fwhandle); in mlxfw_flash_component()
178 static int mlxfw_flash_components(struct mlxfw_dev *mlxfw_dev, u32 fwhandle, in mlxfw_flash_components() argument
185 err = mlxfw_mfa2_file_component_count(mfa2_file, mlxfw_dev->psid, in mlxfw_flash_components()
186 mlxfw_dev->psid_size, in mlxfw_flash_components()
196 comp = mlxfw_mfa2_file_component_get(mfa2_file, mlxfw_dev->psid, in mlxfw_flash_components()
197 mlxfw_dev->psid_size, i); in mlxfw_flash_components()
202 err = mlxfw_flash_component(mlxfw_dev, fwhandle, comp); in mlxfw_flash_components()
210 int mlxfw_firmware_flash(struct mlxfw_dev *mlxfw_dev, in mlxfw_firmware_flash() argument
227 err = mlxfw_dev->ops->fsm_lock(mlxfw_dev, &fwhandle); in mlxfw_firmware_flash()
233 err = mlxfw_fsm_state_wait(mlxfw_dev, fwhandle, in mlxfw_firmware_flash()
238 err = mlxfw_flash_components(mlxfw_dev, fwhandle, mfa2_file); in mlxfw_firmware_flash()
243 err = mlxfw_dev->ops->fsm_activate(mlxfw_dev, fwhandle); in mlxfw_firmware_flash()
249 err = mlxfw_fsm_state_wait(mlxfw_dev, fwhandle, MLXFW_FSM_STATE_LOCKED); in mlxfw_firmware_flash()
254 mlxfw_dev->ops->fsm_release(mlxfw_dev, fwhandle); in mlxfw_firmware_flash()
264 mlxfw_dev->ops->fsm_release(mlxfw_dev, fwhandle); in mlxfw_firmware_flash()