提交 f57e2928 编写于 作者: W Weili Qian 提交者: Herbert Xu

crypto: hisilicon/qm - fix incorrect parameters usage

In qm_get_xqc_depth(), parameters low_bits and high_bits save
the values of the corresponding bits. However, the values saved by the
two parameters are opposite. As a result, the values returned to the
callers are incorrect.

Fixes: 129a9f34 ("crypto: hisilicon/qm - get qp num and depth from hardware registers")
Signed-off-by: NWeili Qian <qianweili@huawei.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 7001141d
...@@ -909,8 +909,8 @@ static void qm_get_xqc_depth(struct hisi_qm *qm, u16 *low_bits, ...@@ -909,8 +909,8 @@ static void qm_get_xqc_depth(struct hisi_qm *qm, u16 *low_bits,
u32 depth; u32 depth;
depth = hisi_qm_get_hw_info(qm, qm_basic_info, type, qm->cap_ver); depth = hisi_qm_get_hw_info(qm, qm_basic_info, type, qm->cap_ver);
*high_bits = depth & QM_XQ_DEPTH_MASK; *low_bits = depth & QM_XQ_DEPTH_MASK;
*low_bits = (depth >> QM_XQ_DEPTH_SHIFT) & QM_XQ_DEPTH_MASK; *high_bits = (depth >> QM_XQ_DEPTH_SHIFT) & QM_XQ_DEPTH_MASK;
} }
static u32 qm_get_irq_num(struct hisi_qm *qm) static u32 qm_get_irq_num(struct hisi_qm *qm)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册