Commit 20e100f5 authored by Shai Malin's avatar Shai Malin Committed by David S. Miller

qed: Handle management FW error

Handle MFW (management FW) error response in order to avoid a crash
during recovery flows.

Changes from v1:
- Add "Fixes tag".

Fixes: tag 5e7ba042 ("qed: Fix reading stale configuration information")
Signed-off-by: default avatarAriel Elior <aelior@marvell.com>
Signed-off-by: default avatarShai Malin <smalin@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dc41c4a9
......@@ -3367,6 +3367,7 @@ qed_mcp_get_nvm_image_att(struct qed_hwfn *p_hwfn,
struct qed_nvm_image_att *p_image_att)
{
enum nvm_image_type type;
int rc;
u32 i;
/* Translate image_id into MFW definitions */
......@@ -3395,7 +3396,10 @@ qed_mcp_get_nvm_image_att(struct qed_hwfn *p_hwfn,
return -EINVAL;
}
qed_mcp_nvm_info_populate(p_hwfn);
rc = qed_mcp_nvm_info_populate(p_hwfn);
if (rc)
return rc;
for (i = 0; i < p_hwfn->nvm_info.num_images; i++)
if (type == p_hwfn->nvm_info.image_att[i].image_type)
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment