Revert "qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()"
This reverts commit6206b7981a
. That patch added additional spin_{un}lock_bh(), which was harmless but pointless. The orginal code path has guaranteed the pair of spin_{un}lock_bh(). We'd better revert it before we find the exact root cause of the bug_on mentioned in that patch. Fixes:6206b7981a
("qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()") Cc: David S. Miller <davem@davemloft.net> Cc: Prabhakar Kushwaha <pkushwaha@marvell.com> Signed-off-by: Jia He <justin.he@arm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8fb4792f09
commit
91bed5565b
@ -474,18 +474,14 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
|
|||||||
|
|
||||||
spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
|
spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
|
||||||
|
|
||||||
if (!qed_mcp_has_pending_cmd(p_hwfn)) {
|
if (!qed_mcp_has_pending_cmd(p_hwfn))
|
||||||
spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
rc = qed_mcp_update_pending_cmd(p_hwfn, p_ptt);
|
rc = qed_mcp_update_pending_cmd(p_hwfn, p_ptt);
|
||||||
if (!rc) {
|
if (!rc)
|
||||||
spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
|
|
||||||
break;
|
break;
|
||||||
} else if (rc != -EAGAIN) {
|
else if (rc != -EAGAIN)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
|
spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
|
||||||
|
|
||||||
@ -502,8 +498,6 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
|
|||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
|
|
||||||
|
|
||||||
/* Send the mailbox command */
|
/* Send the mailbox command */
|
||||||
qed_mcp_reread_offsets(p_hwfn, p_ptt);
|
qed_mcp_reread_offsets(p_hwfn, p_ptt);
|
||||||
seq_num = ++p_hwfn->mcp_info->drv_mb_seq;
|
seq_num = ++p_hwfn->mcp_info->drv_mb_seq;
|
||||||
@ -530,18 +524,14 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
|
|||||||
|
|
||||||
spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
|
spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
|
||||||
|
|
||||||
if (p_cmd_elem->b_is_completed) {
|
if (p_cmd_elem->b_is_completed)
|
||||||
spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
rc = qed_mcp_update_pending_cmd(p_hwfn, p_ptt);
|
rc = qed_mcp_update_pending_cmd(p_hwfn, p_ptt);
|
||||||
if (!rc) {
|
if (!rc)
|
||||||
spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
|
|
||||||
break;
|
break;
|
||||||
} else if (rc != -EAGAIN) {
|
else if (rc != -EAGAIN)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
|
spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
|
||||||
} while (++cnt < max_retries);
|
} while (++cnt < max_retries);
|
||||||
@ -564,7 +554,6 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
|
|||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
|
|
||||||
qed_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
|
qed_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
|
||||||
spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
|
spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user