/linux-6.3-rc2/drivers/net/ethernet/mellanox/mlxfw/ |
A D | mlxfw_mfa2.c | 233 mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, mfa2_file->first_dev, in mlxfw_mfa2_file_validate() 270 mfa2_file = kzalloc(sizeof(*mfa2_file), GFP_KERNEL); in mlxfw_mfa2_file_init() 271 if (!mfa2_file) in mlxfw_mfa2_file_init() 274 mfa2_file->fw = fw; in mlxfw_mfa2_file_init() 298 mfa2_file->first_dev = mlxfw_mfa2_tlv_next(mfa2_file, first_tlv); in mlxfw_mfa2_file_init() 305 mfa2_file->first_component = mlxfw_mfa2_tlv_advance(mfa2_file, in mlxfw_mfa2_file_init() 310 if (!mlxfw_mfa2_valid_ptr(mfa2_file, mfa2_file->cb)) { in mlxfw_mfa2_file_init() 315 cb_top_ptr = mfa2_file->cb + mfa2_file->cb_archive_size - 1; in mlxfw_mfa2_file_init() 323 return mfa2_file; in mlxfw_mfa2_file_init() 325 kfree(mfa2_file); in mlxfw_mfa2_file_init() [all …]
|
A D | mlxfw_mfa2_tlv_multi.h | 12 mlxfw_mfa2_tlv_multi_child(const struct mlxfw_mfa2_file *mfa2_file, 16 mlxfw_mfa2_tlv_next(const struct mlxfw_mfa2_file *mfa2_file, 20 mlxfw_mfa2_tlv_advance(const struct mlxfw_mfa2_file *mfa2_file, 24 mlxfw_mfa2_tlv_multi_child_find(const struct mlxfw_mfa2_file *mfa2_file, 28 int mlxfw_mfa2_tlv_multi_child_count(const struct mlxfw_mfa2_file *mfa2_file, 33 #define mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, from_tlv, count) \ argument 35 idx++, tlv = mlxfw_mfa2_tlv_next(mfa2_file, tlv)) 37 #define mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) \ argument 38 mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, \ 39 mlxfw_mfa2_tlv_multi_child(mfa2_file, multi), \
|
A D | mlxfw_mfa2_tlv.h | 18 mlxfw_mfa2_tlv_get(const struct mlxfw_mfa2_file *mfa2_file, const void *ptr) in mlxfw_mfa2_tlv_get() argument 20 if (!mlxfw_mfa2_valid_ptr(mfa2_file, ptr) || in mlxfw_mfa2_tlv_get() 21 !mlxfw_mfa2_valid_ptr(mfa2_file, ptr + sizeof(struct mlxfw_mfa2_tlv))) in mlxfw_mfa2_tlv_get() 27 mlxfw_mfa2_tlv_payload_get(const struct mlxfw_mfa2_file *mfa2_file, in mlxfw_mfa2_tlv_payload_get() argument 34 if (!mlxfw_mfa2_valid_ptr(mfa2_file, tlv) || in mlxfw_mfa2_tlv_payload_get() 35 !mlxfw_mfa2_valid_ptr(mfa2_file, tlv_top)) in mlxfw_mfa2_tlv_payload_get() 49 mlxfw_mfa2_tlv_ ## name ## _get(const struct mlxfw_mfa2_file *mfa2_file, \ 52 return mlxfw_mfa2_tlv_payload_get(mfa2_file, tlv, \ 59 mlxfw_mfa2_tlv_ ## name ## _get(const struct mlxfw_mfa2_file *mfa2_file, \ 62 return mlxfw_mfa2_tlv_payload_get(mfa2_file, tlv, \
|
A D | mlxfw_mfa2_tlv_multi.c | 13 mlxfw_mfa2_tlv_multi_child(const struct mlxfw_mfa2_file *mfa2_file, in mlxfw_mfa2_tlv_multi_child() argument 19 return mlxfw_mfa2_tlv_get(mfa2_file, (void *) multi + multi_len); in mlxfw_mfa2_tlv_multi_child() 23 mlxfw_mfa2_tlv_next(const struct mlxfw_mfa2_file *mfa2_file, in mlxfw_mfa2_tlv_next() argument 33 multi = mlxfw_mfa2_tlv_multi_get(mfa2_file, tlv); in mlxfw_mfa2_tlv_next() 38 return mlxfw_mfa2_tlv_get(mfa2_file, next); in mlxfw_mfa2_tlv_next() 42 mlxfw_mfa2_tlv_advance(const struct mlxfw_mfa2_file *mfa2_file, in mlxfw_mfa2_tlv_advance() argument 48 mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, from_tlv, count) in mlxfw_mfa2_tlv_advance() 55 mlxfw_mfa2_tlv_multi_child_find(const struct mlxfw_mfa2_file *mfa2_file, in mlxfw_mfa2_tlv_multi_child_find() argument 63 mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) { in mlxfw_mfa2_tlv_multi_child_find() 75 int mlxfw_mfa2_tlv_multi_child_count(const struct mlxfw_mfa2_file *mfa2_file, in mlxfw_mfa2_tlv_multi_child_count() argument [all …]
|
A D | mlxfw_mfa2_file.h | 20 static inline bool mlxfw_mfa2_valid_ptr(const struct mlxfw_mfa2_file *mfa2_file, in mlxfw_mfa2_valid_ptr() argument 23 const void *valid_to = mfa2_file->fw->data + mfa2_file->fw->size; in mlxfw_mfa2_valid_ptr() 24 const void *valid_from = mfa2_file->fw->data; in mlxfw_mfa2_valid_ptr()
|
A D | mlxfw_mfa2.h | 22 int mlxfw_mfa2_file_component_count(const struct mlxfw_mfa2_file *mfa2_file, 27 mlxfw_mfa2_file_component_get(const struct mlxfw_mfa2_file *mfa2_file, 33 void mlxfw_mfa2_file_fini(struct mlxfw_mfa2_file *mfa2_file);
|
A D | mlxfw_fsm.c | 307 struct mlxfw_mfa2_file *mfa2_file, in mlxfw_flash_components() argument 315 err = mlxfw_mfa2_file_component_count(mfa2_file, mlxfw_dev->psid, in mlxfw_flash_components() 327 comp = mlxfw_mfa2_file_component_get(mfa2_file, mlxfw_dev->psid, in mlxfw_flash_components() 351 struct mlxfw_mfa2_file *mfa2_file; in mlxfw_firmware_flash() local 362 mfa2_file = mlxfw_mfa2_file_init(firmware); in mlxfw_firmware_flash() 363 if (IS_ERR(mfa2_file)) { in mlxfw_firmware_flash() 364 err = PTR_ERR(mfa2_file); in mlxfw_firmware_flash() 394 err = mlxfw_flash_components(mlxfw_dev, fwhandle, mfa2_file, in mlxfw_firmware_flash() 418 mlxfw_mfa2_file_fini(mfa2_file); in mlxfw_firmware_flash() 429 mlxfw_mfa2_file_fini(mfa2_file); in mlxfw_firmware_flash()
|