Skip to content

Commit

Permalink
qed: Handle management FW error
Browse files Browse the repository at this point in the history
Handle MFW (management FW) error response in order to avoid a crash
during recovery flows.

Changes from v1:
- Add "Fixes tag".

Fixes: tag 5e7ba04 ("qed: Fix reading stale configuration information")
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: Shai Malin <smalin@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Shai Malin authored and David S. Miller committed Sep 10, 2021
1 parent dc41c4a commit 20e100f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/ethernet/qlogic/qed/qed_mcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 20e100f

Please sign in to comment.