From: hgchu Date: Fri, 12 Jan 2018 04:14:44 +0000 (+0900) Subject: scsi: ufs: fix data segment length for upiu header X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=74cf8b55c33ffc17e7beb3d181c1c392bb6d1655;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git scsi: ufs: fix data segment length for upiu header Change-Id: I3f1c16422c32809390c83dc4391f396b9e9b0ad6 Signed-off-by: hgchu --- diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 3983c38cbf4f..7df4c38ecdfe 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2221,6 +2221,9 @@ static void ufshcd_prepare_utp_query_req_upiu(struct ufs_hba *hba, ucd_req_ptr->header.dword_1 = UPIU_HEADER_DWORD( 0, query->request.query_func, 0, 0); + if (query->request.upiu_req.opcode == UPIU_QUERY_OPCODE_READ_DESC) + len = 0; + /* Data segment length only need for WRITE_DESC */ if (query->request.upiu_req.opcode == UPIU_QUERY_OPCODE_WRITE_DESC) ucd_req_ptr->header.dword_2 =