Lines Matching refs:fw_update_msg

126 	struct hinic_cmd_update_fw *fw_update_msg = NULL;  in hinic_flash_fw()  local
129 u16 out_size = sizeof(*fw_update_msg); in hinic_flash_fw()
133 fw_update_msg = kzalloc(sizeof(*fw_update_msg), GFP_KERNEL); in hinic_flash_fw()
134 if (!fw_update_msg) in hinic_flash_fw()
168 fw_update_msg->total_len = up_total_len; in hinic_flash_fw()
171 fw_update_msg->total_len = 0; in hinic_flash_fw()
174 memset(fw_update_msg->data, 0, MAX_FW_FRAGMENT_LEN); in hinic_flash_fw()
176 fw_update_msg->ctl_info.SF = in hinic_flash_fw()
179 fw_update_msg->section_info.FW_section_CRC = section_crc; in hinic_flash_fw()
180 fw_update_msg->fw_section_version = section_version; in hinic_flash_fw()
181 fw_update_msg->ctl_info.flag = UP_TYPE_A; in hinic_flash_fw()
184 fw_update_msg->section_info.FW_section_type = in hinic_flash_fw()
189 fw_update_msg->ctl_info.flag = UP_TYPE_B; in hinic_flash_fw()
191 fw_update_msg->ctl_info.flag = UP_TYPE_A; in hinic_flash_fw()
193 fw_update_msg->section_info.FW_section_type = in hinic_flash_fw()
197 fw_update_msg->setion_total_len = section_len; in hinic_flash_fw()
198 fw_update_msg->section_offset = send_pos; in hinic_flash_fw()
201 fw_update_msg->ctl_info.SL = true; in hinic_flash_fw()
202 fw_update_msg->ctl_info.fragment_len = in hinic_flash_fw()
206 fw_update_msg->ctl_info.SL = false; in hinic_flash_fw()
207 fw_update_msg->ctl_info.fragment_len = in hinic_flash_fw()
212 memcpy(fw_update_msg->data, in hinic_flash_fw()
215 fw_update_msg->ctl_info.fragment_len); in hinic_flash_fw()
219 fw_update_msg, in hinic_flash_fw()
220 sizeof(*fw_update_msg), in hinic_flash_fw()
221 fw_update_msg, &out_size); in hinic_flash_fw()
222 if (err || !out_size || fw_update_msg->status) { in hinic_flash_fw()
224 err, fw_update_msg->status, out_size); in hinic_flash_fw()
225 err = fw_update_msg->status ? in hinic_flash_fw()
226 fw_update_msg->status : -EIO; in hinic_flash_fw()
227 kfree(fw_update_msg); in hinic_flash_fw()
237 kfree(fw_update_msg); in hinic_flash_fw()