diff options
author | Weili Qian <qianweili@huawei.com> | 2022-09-24 18:14:42 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-10-21 19:05:23 +0800 |
commit | f57e292897cac13b6ddee078aea21173b234ecb7 (patch) | |
tree | daf4afaaa34f31161e1020e231bc37ccfd299919 /drivers/crypto | |
parent | 7001141d34e550854425afa76e960513cf150a62 (diff) | |
download | linux-f57e292897cac13b6ddee078aea21173b234ecb7.tar.gz linux-f57e292897cac13b6ddee078aea21173b234ecb7.tar.bz2 linux-f57e292897cac13b6ddee078aea21173b234ecb7.zip |
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: 129a9f340172 ("crypto: hisilicon/qm - get qp num and depth from hardware registers")
Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/hisilicon/qm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 9a38e170fb1d..01c083e2c4bd 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -909,8 +909,8 @@ static void qm_get_xqc_depth(struct hisi_qm *qm, u16 *low_bits, u32 depth; 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_SHIFT) & QM_XQ_DEPTH_MASK; + *low_bits = depth & 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) |