Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scsi: ufs: Use pre-calculated offsets in ufshcd_init_lrb()
stable inclusion from stable-v6.6.57 commit 7994a4849c8b1501c2e5c21edd1085b16efb98fa category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB2M97 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7994a4849c8b1501c2e5c21edd1085b16efb98fa -------------------------------- commit d5130c5a093257aa4542aaded8034ef116a7624a upstream. Replace manual offset calculations for response_upiu and prd_table in ufshcd_init_lrb() with pre-calculated offsets already stored in the utp_transfer_req_desc structure. The pre-calculated offsets are set differently in ufshcd_host_memory_configure() based on the UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk, ensuring correct alignment and access. Fixes: 26f968d ("scsi: ufs: Introduce UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk") Cc: [email protected] Signed-off-by: Avri Altman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Wen Zhiwei <[email protected]>
- Loading branch information