summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBean Huo <beanhuo@micron.com>2019-11-12 23:34:35 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-11-12 22:21:34 -0500
commit3d4881d1d6450b7b60da498e607610ac382bdb49 (patch)
treefa717d42e7ebcbeee6a471b30facf4fe9e4410ec
parent964231aa0c7ef53ebc9c2a6889bbc50d8a3f2220 (diff)
scsi: ufs: print helpful hint when response size exceed buffer size
Print out returned response size and buffer size, while the front one is bigger than the back one. Link: https://lore.kernel.org/r/20191112223436.27449-2-huobean@gmail.com Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/ufs/ufshcd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 9cbe3b45cf1c..527bd3b4f834 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1938,8 +1938,8 @@ int ufshcd_copy_query_response(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
memcpy(hba->dev_cmd.query.descriptor, descp, resp_len);
} else {
dev_warn(hba->dev,
- "%s: Response size is bigger than buffer",
- __func__);
+ "%s: rsp size %d is bigger than buffer size %d",
+ __func__, resp_len, buf_len);
return -EINVAL;
}
}
@@ -5864,7 +5864,9 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba,
memcpy(desc_buff, descp, resp_len);
*buff_len = resp_len;
} else {
- dev_warn(hba->dev, "rsp size is bigger than buffer");
+ dev_warn(hba->dev,
+ "%s: rsp size %d is bigger than buffer size %d",
+ __func__, resp_len, *buff_len);
*buff_len = 0;
err = -EINVAL;
}