From patchwork Tue Feb 5 16:47:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinayak Holikatti X-Patchwork-Id: 2098411 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 77770DF24C for ; Tue, 5 Feb 2013 16:49:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755595Ab3BEQsn (ORCPT ); Tue, 5 Feb 2013 11:48:43 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:52844 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755764Ab3BEQsk (ORCPT ); Tue, 5 Feb 2013 11:48:40 -0500 Received: by mail-pa0-f41.google.com with SMTP id fb11so237333pad.28 for ; Tue, 05 Feb 2013 08:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=sgYSBmRVCzqcx64911uMduNrPW7h1+3ehfMyG/qUmc0=; b=a3ZNM7jKAR2Lmh4ZGW9Zxw6uLaiSohzFD3RFce9L6MKOmp2p+Nw6+XNHx0FqaZyvVp psvPtCVgCGupcetFqkRiG+JiwkuxJ2frDRwLoG+BbjLTzSewpJxF84nlK7cmaTVmIMaS ZjmHFNzLH0UGQH53V5hbUK1cQzDZovGilm1BW5KThqLiKPIIQKn7KPeloDbtAk0aLHmC zXPsmnqi4CepoEfrqLR32fbFD2Vf84qS+1OKMYvf+03oFLbmbgg/m62YKJLJI5X1D//W aR3/DYP4C+le8XQeN4BbeB/ViGDS4z9V3NyRwbGqb8B4mxGtZznDIzOTcHwCNNRIaBLy Tr6Q== X-Received: by 10.66.74.2 with SMTP id p2mr66348470pav.55.1360082919212; Tue, 05 Feb 2013 08:48:39 -0800 (PST) Received: from localhost.localdomain ([223.239.140.194]) by mx.google.com with ESMTPS id t6sm30677347paz.11.2013.02.05.08.48.34 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 Feb 2013 08:48:38 -0800 (PST) From: vinholikatti@gmail.com To: james.bottomley@hansenpartnership.com Cc: linux-scsi@vger.kernel.org, santoshsy@gmail.com, patches@linaro.org, linux-samsung-soc@vger.kernel.org, arnd@linaro.org, saugata.das@linaro.org, venkat@linaro.org, subhashj@codeaurora.org, sthumma@codeaurora.org, vinholikatti@gmail.com Subject: [PATCH V6 4/4] [SCSI] ufs: Correct the expected data transfersize Date: Tue, 5 Feb 2013 22:17:37 +0530 Message-Id: <511137e6.0657420a.5b57.ffffa80b@mx.google.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1360082857-3317-1-git-send-email-y> References: <1360082857-3317-1-git-send-email-y> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Vinayak Holikatti This patch corrects the expected data transfer size of the command UPIU. The current implementation of cmd->transfersize is wrong as it probably equal to sector size. With this implementation the transfer size is updated correctly Reported-by: KOBAYASHI Yoshitake Reviewed-by: Arnd Bergmann Reviewed-by: Namjae Jeon Reviewed-by: Subhash Jadavani Signed-off-by: Santosh Yaraganavi Signed-off-by: Vinayak Holikatti --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 60fd40c..c32a478 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -478,7 +478,7 @@ static void ufshcd_compose_upiu(struct ufshcd_lrb *lrbp) ucd_cmd_ptr->header.dword_2 = 0; ucd_cmd_ptr->exp_data_transfer_len = - cpu_to_be32(lrbp->cmd->transfersize); + cpu_to_be32(lrbp->cmd->sdb.length); memcpy(ucd_cmd_ptr->cdb, lrbp->cmd->cmnd,