From patchwork Wed Oct 17 11:53:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinayak Holikatti X-Patchwork-Id: 12308 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 BB0D31D5170 for ; Wed, 17 Oct 2012 11:56:11 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 6D668A1943A for ; Wed, 17 Oct 2012 11:56:11 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so11202714iej.11 for ; Wed, 17 Oct 2012 04:56:11 -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 :in-reply-to:references:x-gm-message-state; bh=nU3rsQzRg0xpmBPXyBxhM3adreiCUEPqjw11T65BsoY=; b=JhqWsuoL7TUcuRMiydqstCqMsKMxQaz36CfDag+D3i7FFsROX/Ab/4uiyAxlXUk5vK dYDCSvShwHukpZ2/PIc9xxciSM4rDOm2tbwf7bsSFNNZRcL6xfuXUeVcFaFKj8p6H4dX +6N1aJi92Tvjgc/7bwbpDt05+K7UZkDCRT4k3OpJQAKutizFRQVkLCPKmkq4QIi93fpD r54HawG0ssHgYW0oFg2+uJPzJbO8L0IVzDzb60pQIiCHD/o36cUCmrPtqwOyIZPAQ919 mfUfr035BmIAM2hdRmQ3+a/YpbtADuk1EDpFnEtdoHyWnwLJmVoBtjYlDFs+qWPMZKFp XnNA== Received: by 10.42.145.66 with SMTP id e2mr14048412icv.18.1350474971196; Wed, 17 Oct 2012 04:56:11 -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.50.67.148 with SMTP id n20csp882796igt; Wed, 17 Oct 2012 04:56:10 -0700 (PDT) Received: by 10.66.72.35 with SMTP id a3mr49801489pav.66.1350474970574; Wed, 17 Oct 2012 04:56:10 -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 np6si26141385pbc.209.2012.10.17.04.56.09 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Oct 2012 04:56:10 -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 mail-pb0-f50.google.com with SMTP id md4so7899630pbc.37 for ; Wed, 17 Oct 2012 04:56:09 -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:in-reply-to:references; bh=nU3rsQzRg0xpmBPXyBxhM3adreiCUEPqjw11T65BsoY=; b=I7oPGE9569SfdSp+EZdf3VLHoIOJNG0QN3YCGvAj+kMqLFNORG2/48Au0Ct2EHQDdw e1mlLzoRAwTPAZKFOLkiUvXVm/DZC8X3FY2mFO1v+hpEMEvJTprH1hedn1Ha/Frhc0Oo fwG1a9NDnn9yNcGQ2OyzC7ZfTUZN/lu5KC5k++/c4sHXTOLPxvzVPA7DRC9cAgdamJ2N GjFnfecRHjl7qxArUfc/Uz9Xjex5TRKCkR790EDhpE/Kz+RET/2OOzuWgMr2ElQvIw9f 9rTJ/zM7+Y4bjp+zaleBagzLqwDsoSpD3Y0UbeppMcjG3cKQ7GhCvXCgrvposgWE5aFb XvHw== Received: by 10.66.85.10 with SMTP id d10mr50032363paz.52.1350474969031; Wed, 17 Oct 2012 04:56:09 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id o1sm12498427pax.21.2012.10.17.04.56.03 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Oct 2012 04:56:08 -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, 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 , Santosh Yaraganavi Subject: [PATCH V4 4/4] [SCSI] ufs: Correct the expected data transfer size Date: Wed, 17 Oct 2012 17:23:42 +0530 Message-Id: <1350474822-7315-5-git-send-email-vinholikatti@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1350474822-7315-1-git-send-email-vinholikatti@gmail.com> References: <1350474822-7315-1-git-send-email-vinholikatti@gmail.com> X-Gm-Message-State: ALoCoQmO7+FndP6raRLwe+aRtsZyMWAFMwvjYYd2UNQP8i6FIkz8P346I7BJIHgbPr8IP2n1G0zm 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 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 5d7bd47..57c16ec 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,