scsi: ufs: core: Fix ufshcd_inc_sq_tail() function bug
authorzhanghui <zhanghui31@xiaomi.com>
Thu, 1 Jun 2023 12:46:14 +0000 (20:46 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 8 Jun 2023 01:20:21 +0000 (21:20 -0400)
commite01d05bbf6348ccd9f5a057280310d78ea9e7b52
treea9872b9eaad25181db50422ef7b36360687bb9fd
parent72554035b9797e00e68cd866e6cefa7f0b2c6f76
scsi: ufs: core: Fix ufshcd_inc_sq_tail() function bug

When qdepth is not power of 2, not every bit of the mask is 1, so
in sq_tail_slot some bits will be cleared unexpectedly.

Signed-off-by: zhanghui <zhanghui31@xiaomi.com>
Link: https://lore.kernel.org/r/20230601124613.1446-1-zhanghui31@xiaomi.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd-priv.h