From patchwork Fri Jul 13 14:34:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinayak Holikatti X-Patchwork-Id: 9992 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 72CD623E3D for ; Fri, 13 Jul 2012 14:35:23 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 42B4EA182BE for ; Fri, 13 Jul 2012 14:35:23 +0000 (UTC) Received: by ghbz12 with SMTP id z12so3933171ghb.11 for ; Fri, 13 Jul 2012 07:35:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=j1j9dgf5eHJXOUPc5EbYjfBIXCqPQZArwcjAQOG/1Bk=; b=ag8krwMMuortEeGDdUv6rBamD7uCMkeaCfxwWMg8QRL5zHWtfSVBg7eH3q7a+kVIg+ znumADAiiwYRHxixWwzfKowwFDy6s18PMJVb5/CwF3F3we2UCea/YEGnEiGDXeytG+Jl +xd8QgahqKcBBP/BecrL1NGDVMYOvbp/OQSJrITPIzN5+xWfk7Asucrj1cRNhBOpD6s6 u8/qZxE8VA8zFVx2fvZuFP45dY/ApVY/Z0yqRZBb0VuFg9UcbjYZ/dTNW7Chr3VkAvJ/ QHjEiAO/SrvoBFP8e38lQ2MJdTvlsI8ks09yXSqzqhLtCYe2OxD4Ld1nOUK3rjCpZOSg WhxQ== Received: by 10.50.87.227 with SMTP id bb3mr1113763igb.57.1342190119099; Fri, 13 Jul 2012 07:35:19 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp16331ibb; Fri, 13 Jul 2012 07:35:16 -0700 (PDT) Received: by 10.50.34.200 with SMTP id b8mr1546398igj.50.1342190115492; Fri, 13 Jul 2012 07:35:15 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id ok5si11233115icb.80.2012.07.13.07.35.12 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jul 2012 07:35:15 -0700 (PDT) Received-SPF: pass (google.com: domain of vinholikatti@gmail.com designates 209.85.160.50 as permitted sender) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of vinholikatti@gmail.com designates 209.85.160.50 as permitted sender) smtp.mail=vinholikatti@gmail.com; dkim=pass header.i=@gmail.com Received: by pbbrr4 with SMTP id rr4so6736271pbb.37 for ; Fri, 13 Jul 2012 07:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=j1j9dgf5eHJXOUPc5EbYjfBIXCqPQZArwcjAQOG/1Bk=; b=rqq3xiXm+/EHsX5Zb2j3M+c8rRoUv7zg4BRb6JFXEUcs7kSczdhm6ofKnTSqge0b9d N+JSCX4FUNzkPzLuFRi1rY3ZQVMPtiXtHgzsRmUy6rVrY5c2UO4LfKQI7n2VcafhZmfo hmcW6O8rZwVCwaWJ/TsznwLJWsf8mEc7YN3UxnM3Vq860xJdA/gG4ZAU+YUiuFZPsPvL 4mTUpPaZJkiw52dygKCYyd9Fev0CQp+qwu97H/NVkollEBJ7pbSUBVrA6JqVEg7N76I6 KUto33Fztbnr1eDIQW3MsO/LTDBLC3GcwdLOxPEkLv9yKILkWJH2csFsrOFLMMMnav6X p5oQ== Received: by 10.68.239.164 with SMTP id vt4mr3744117pbc.166.1342190112440; Fri, 13 Jul 2012 07:35:12 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id oy8sm6118670pbc.52.2012.07.13.07.35.06 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jul 2012 07:35:11 -0700 (PDT) From: Vinayak Holikatti To: James.Bottomley@hansenpartnership.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org, linux-samsung-soc@vger.kernel.org, santoshsy@gmail.com, arnd@linaro.org, girish.shivananjappa@linaro.org, saugata.das@linaro.org, vishak.g@samsung.com, venkat@linaro.org, k.rajesh@samsung.com, dsaxena@linaro.org, ilho215.lee@samsung.com, nala.la@samsung.com, sreekumar.c@samsung.com, Vinayak Holikatti Subject: [PATCH V2 4/4] [SCSI] ufs: Correct the expected data transfer size Date: Fri, 13 Jul 2012 20:04:45 +0530 Message-Id: <1342190085-20480-1-git-send-email-vinholikatti@gmail.com> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQmnwf3IwIUinJBZWGhQIT+Jgqb5t8LCPscKshjK6Pe3mUICHsCc/frNCL1KFcp/b9BQa8L5 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 Signed-off-by: Vinayak Holikatti Signed-off-by: Santosh Yaraganavi --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index dfc3e85..5e732c3 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -488,7 +488,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,