mfa2_file         176 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c 				  struct mlxfw_mfa2_file *mfa2_file,
mfa2_file         183 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c 	err = mlxfw_mfa2_file_component_count(mfa2_file, mlxfw_dev->psid,
mfa2_file         195 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c 		comp = mlxfw_mfa2_file_component_get(mfa2_file, mlxfw_dev->psid,
mfa2_file         213 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c 	struct mlxfw_mfa2_file *mfa2_file;
mfa2_file         223 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c 	mfa2_file = mlxfw_mfa2_file_init(firmware);
mfa2_file         224 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c 	if (IS_ERR(mfa2_file))
mfa2_file         225 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c 		return PTR_ERR(mfa2_file);
mfa2_file         242 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c 	err = mlxfw_flash_components(mlxfw_dev, fwhandle, mfa2_file, extack);
mfa2_file         265 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c 	mlxfw_mfa2_file_fini(mfa2_file);
mfa2_file         274 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c 	mlxfw_mfa2_file_fini(mfa2_file);
mfa2_file          95 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c mlxfw_mfa2_tlv_multi_validate(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file         102 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) {
mfa2_file         112 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c mlxfw_mfa2_file_dev_validate(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file         126 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	multi = mlxfw_mfa2_tlv_multi_get(mfa2_file, dev_tlv);
mfa2_file         132 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	if (!mlxfw_mfa2_tlv_multi_validate(mfa2_file, multi))
mfa2_file         136 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	tlv = mlxfw_mfa2_tlv_multi_child_find(mfa2_file, multi,
mfa2_file         143 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	psid = mlxfw_mfa2_tlv_psid_get(mfa2_file, tlv);
mfa2_file         153 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	err = mlxfw_mfa2_tlv_multi_child_count(mfa2_file, multi,
mfa2_file         165 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 		tlv = mlxfw_mfa2_tlv_multi_child_find(mfa2_file, multi,
mfa2_file         171 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 		cptr = mlxfw_mfa2_tlv_component_ptr_get(mfa2_file, tlv);
mfa2_file         185 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c mlxfw_mfa2_file_comp_validate(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file         195 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	multi = mlxfw_mfa2_tlv_multi_get(mfa2_file, comp_tlv);
mfa2_file         201 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	if (!mlxfw_mfa2_tlv_multi_validate(mfa2_file, multi))
mfa2_file         205 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	tlv = mlxfw_mfa2_tlv_multi_child(mfa2_file, multi);
mfa2_file         211 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	cdesc = mlxfw_mfa2_tlv_component_descriptor_get(mfa2_file, tlv);
mfa2_file         225 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c static bool mlxfw_mfa2_file_validate(const struct mlxfw_mfa2_file *mfa2_file)
mfa2_file         233 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, mfa2_file->first_dev,
mfa2_file         234 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 			       mfa2_file->dev_count) {
mfa2_file         241 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 		if (!mlxfw_mfa2_file_dev_validate(mfa2_file, tlv, idx))
mfa2_file         246 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, mfa2_file->first_component,
mfa2_file         247 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 			       mfa2_file->component_count) {
mfa2_file         254 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 		if (!mlxfw_mfa2_file_comp_validate(mfa2_file, tlv, idx))
mfa2_file         266 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	struct mlxfw_mfa2_file *mfa2_file;
mfa2_file         270 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mfa2_file = kcalloc(1, sizeof(*mfa2_file), GFP_KERNEL);
mfa2_file         271 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	if (!mfa2_file)
mfa2_file         274 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mfa2_file->fw = fw;
mfa2_file         276 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	first_tlv = mlxfw_mfa2_tlv_get(mfa2_file, first_tlv_ptr);
mfa2_file         282 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	multi = mlxfw_mfa2_tlv_multi_get(mfa2_file, first_tlv);
mfa2_file         288 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	multi_child = mlxfw_mfa2_tlv_multi_child(mfa2_file, multi);
mfa2_file         292 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	pd = mlxfw_mfa2_tlv_package_descriptor_get(mfa2_file, multi_child);
mfa2_file         298 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mfa2_file->first_dev = mlxfw_mfa2_tlv_next(mfa2_file, first_tlv);
mfa2_file         299 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	if (!mfa2_file->first_dev) {
mfa2_file         304 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mfa2_file->dev_count = be16_to_cpu(pd->num_devices);
mfa2_file         305 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mfa2_file->first_component = mlxfw_mfa2_tlv_advance(mfa2_file,
mfa2_file         306 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 							    mfa2_file->first_dev,
mfa2_file         307 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 							    mfa2_file->dev_count);
mfa2_file         308 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mfa2_file->component_count = be16_to_cpu(pd->num_components);
mfa2_file         309 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mfa2_file->cb = fw->data + NLA_ALIGN(be32_to_cpu(pd->cb_offset));
mfa2_file         310 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	if (!mlxfw_mfa2_valid_ptr(mfa2_file, mfa2_file->cb)) {
mfa2_file         314 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mfa2_file->cb_archive_size = be32_to_cpu(pd->cb_archive_size);
mfa2_file         315 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	cb_top_ptr = mfa2_file->cb + mfa2_file->cb_archive_size - 1;
mfa2_file         316 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	if (!mlxfw_mfa2_valid_ptr(mfa2_file, cb_top_ptr)) {
mfa2_file         321 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	if (!mlxfw_mfa2_file_validate(mfa2_file))
mfa2_file         323 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	return mfa2_file;
mfa2_file         325 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	kfree(mfa2_file);
mfa2_file         330 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c mlxfw_mfa2_tlv_dev_get(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file         340 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	mlxfw_mfa2_tlv_foreach(mfa2_file, dev_tlv, idx, mfa2_file->first_dev,
mfa2_file         341 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 			       mfa2_file->dev_count) {
mfa2_file         345 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 		dev_multi = mlxfw_mfa2_tlv_multi_get(mfa2_file, dev_tlv);
mfa2_file         350 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 		tlv = mlxfw_mfa2_tlv_multi_child_find(mfa2_file, dev_multi,
mfa2_file         357 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 		tlv_psid = mlxfw_mfa2_tlv_psid_get(mfa2_file, tlv);
mfa2_file         368 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c int mlxfw_mfa2_file_component_count(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file         376 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	dev_multi = mlxfw_mfa2_tlv_dev_get(mfa2_file, psid, psid_size);
mfa2_file         380 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	err = mlxfw_mfa2_tlv_multi_child_count(mfa2_file, dev_multi,
mfa2_file         425 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c static int mlxfw_mfa2_file_cb_offset_xz(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file         438 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	dec_buf.in_size = mfa2_file->cb_archive_size;
mfa2_file         439 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	dec_buf.in = mfa2_file->cb;
mfa2_file         471 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c mlxfw_mfa2_file_component_tlv_get(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file         478 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	if (comp_index > mfa2_file->component_count)
mfa2_file         481 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	comp_tlv = mlxfw_mfa2_tlv_advance(mfa2_file, mfa2_file->first_component,
mfa2_file         486 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	multi = mlxfw_mfa2_tlv_multi_get(mfa2_file, comp_tlv);
mfa2_file         490 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	multi_child = mlxfw_mfa2_tlv_multi_child(mfa2_file, multi);
mfa2_file         494 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	return mlxfw_mfa2_tlv_component_descriptor_get(mfa2_file, multi_child);
mfa2_file         503 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c mlxfw_mfa2_file_component_find(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file         512 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	dev_multi = mlxfw_mfa2_tlv_dev_get(mfa2_file, psid, psid_size);
mfa2_file         516 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	cptr_tlv = mlxfw_mfa2_tlv_multi_child_find(mfa2_file, dev_multi,
mfa2_file         522 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	cptr = mlxfw_mfa2_tlv_component_ptr_get(mfa2_file, cptr_tlv);
mfa2_file         527 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	return mlxfw_mfa2_file_component_tlv_get(mfa2_file, comp_idx);
mfa2_file         531 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c mlxfw_mfa2_file_component_get(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file         542 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	comp = mlxfw_mfa2_file_component_find(mfa2_file, psid, psid_size,
mfa2_file         557 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	err = mlxfw_mfa2_file_cb_offset_xz(mfa2_file, cb_offset, comp_buf_size,
mfa2_file         586 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c void mlxfw_mfa2_file_fini(struct mlxfw_mfa2_file *mfa2_file)
mfa2_file         588 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c 	kfree(mfa2_file);
mfa2_file          22 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.h int mlxfw_mfa2_file_component_count(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          27 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.h mlxfw_mfa2_file_component_get(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          33 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.h void mlxfw_mfa2_file_fini(struct mlxfw_mfa2_file *mfa2_file);
mfa2_file          20 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_file.h static inline bool mlxfw_mfa2_valid_ptr(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          23 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_file.h 	const void *valid_to = mfa2_file->fw->data + mfa2_file->fw->size;
mfa2_file          24 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_file.h 	const void *valid_from = mfa2_file->fw->data;
mfa2_file          18 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h mlxfw_mfa2_tlv_get(const struct mlxfw_mfa2_file *mfa2_file, const void *ptr)
mfa2_file          20 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h 	if (!mlxfw_mfa2_valid_ptr(mfa2_file, ptr) ||
mfa2_file          21 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h 	    !mlxfw_mfa2_valid_ptr(mfa2_file, ptr + sizeof(struct mlxfw_mfa2_tlv)))
mfa2_file          27 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h mlxfw_mfa2_tlv_payload_get(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          34 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h 	if (!mlxfw_mfa2_valid_ptr(mfa2_file, tlv) ||
mfa2_file          35 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h 	    !mlxfw_mfa2_valid_ptr(mfa2_file, tlv_top))
mfa2_file          49 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h mlxfw_mfa2_tlv_ ## name ## _get(const struct mlxfw_mfa2_file *mfa2_file,       \
mfa2_file          52 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h 	return mlxfw_mfa2_tlv_payload_get(mfa2_file, tlv,		       \
mfa2_file          59 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h mlxfw_mfa2_tlv_ ## name ## _get(const struct mlxfw_mfa2_file *mfa2_file,       \
mfa2_file          62 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv.h 	return mlxfw_mfa2_tlv_payload_get(mfa2_file, tlv,		       \
mfa2_file          13 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c mlxfw_mfa2_tlv_multi_child(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          19 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c 	return mlxfw_mfa2_tlv_get(mfa2_file, (void *) multi + multi_len);
mfa2_file          23 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c mlxfw_mfa2_tlv_next(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          33 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c 		multi = mlxfw_mfa2_tlv_multi_get(mfa2_file, tlv);
mfa2_file          38 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c 	return mlxfw_mfa2_tlv_get(mfa2_file, next);
mfa2_file          42 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c mlxfw_mfa2_tlv_advance(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          48 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c 	mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, from_tlv, count)
mfa2_file          55 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c mlxfw_mfa2_tlv_multi_child_find(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          63 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c 	mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) {
mfa2_file          75 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c int mlxfw_mfa2_tlv_multi_child_count(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          84 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.c 	mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) {
mfa2_file          12 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h mlxfw_mfa2_tlv_multi_child(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          16 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h mlxfw_mfa2_tlv_next(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          20 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h mlxfw_mfa2_tlv_advance(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          24 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h mlxfw_mfa2_tlv_multi_child_find(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          28 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h int mlxfw_mfa2_tlv_multi_child_count(const struct mlxfw_mfa2_file *mfa2_file,
mfa2_file          33 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h #define mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, from_tlv, count) \
mfa2_file          35 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h 	     idx++, tlv = mlxfw_mfa2_tlv_next(mfa2_file, tlv))
mfa2_file          37 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h #define mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) \
mfa2_file          38 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h 	mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, \
mfa2_file          39 drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_tlv_multi.h 			       mlxfw_mfa2_tlv_multi_child(mfa2_file, multi), \