scsi: ufs: make ufshcd_print_trs() consider UFSHCD_QUIRK_PRDT_BYTE_GRAN
PATCH 1/1 scsi: ufs: make ufshcd_print_trs() consider UFSHCD_QUIRK_PRDT_BYTE_GRAN
From: Eric Biggers <[email protected]>
Fix ufshcd_print_trs() to consider UFSHCD_QUIRK_PRDT_BYTE_GRAN when using utp_transfer_req_desc::prd_table_length, so that it doesn't treat the number of bytes as the number of entries.
Originally from Kiwoong Kim
(https://lkml.kernel.org/r/[email protected]).
Fixes 26f968d7de82 ("scsi: ufs: Introduce UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk")
Cc Alim Akhtar <[email protected]>
Cc Kiwoong Kim <[email protected]>
Signed-off-by Eric Biggers <[email protected]>
--- drivers/scsi/ufs/ufshcd.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/scsi/ufs/ufshcd.c +3 -0
@@ -474,6 +474,9 @@ void ufshcd_print_trs(struct ufs_hba *hba, unsigned long bitmap, bool pr_prdt) prdt_length =le16_to_cpu ( lrbp->utr_descriptor_ptr->prd_table_length); +if (hba->quirks &UFSHCD_QUIRK_PRDT_BYTE_GRAN ) + prdt_length /=sizeof (struct ufshcd_sg_entry ); + dev_err(hba->dev, "UPIU[%d] - PRDT - %d entries phys@0x%llx\n", tag, prdt_length,
Signature · 1 line
2.28.0
Martin K. Petersen
AppliedQuoted 6 lines · Eric Biggers
Fix
ufshcd_print_trs()to considerUFSHCD_QUIRK_PRDT_BYTE_GRANwhen usingutp_transfer_req_desc::prd_table_length, so that it doesn't treat the number of bytes as the number of entries.Originally from Kiwoong Kim
(https://lkml.kernel.org/r/[email protected]).
Applied to 5.10/scsi-queue, thanks!
[1/1] scsi: ufs: Make ufshcd_print_trs() consider UFSHCD_QUIRK_PRDT_BYTE_GRAN
https://git.kernel.org/mkp/scsi/c/cc770ce34aee
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering