From patchwork Mon Jul 2 14:32:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinayak Holikatti X-Patchwork-Id: 9746 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 5BA8923E2F for ; Mon, 2 Jul 2012 14:33:47 +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 239CBA18B39 for ; Mon, 2 Jul 2012 14:33:47 +0000 (UTC) Received: by ghbz12 with SMTP id z12so4504155ghb.11 for ; Mon, 02 Jul 2012 07:33:46 -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=a6fTBox5rhoENW2CX+gRNrCmmxL8fF2fGhYy56Tvfns=; b=Ef1qfBw4J7SrQN2+CU9+saqJXu6iz0R4W0kL8UiAMDV0snxi0K38chxbWOrtwIfrFT UQgJo6oJvT+Ol/tnkXLvtKnRMHlZ8vYr5DUj/Kd9GETGCcFXje2rPJkrUpGRXBAkySXQ ICERSV/fdAQp0uIg+wmBWT+L+wjiN0+I/GPe50bpAEoofcI02NFnZG/Yu3G98YEDS+Ab HY1MHnvArhKLMSsZs1JmuyKxyw1IZFELuUtYGCMIoPK1FHiW0tP/JpkgbGdhyv0Y/K/F W3+S8eSgVKhDdpSda/bnHT8uS2fpCWhe/wY/FvEgbKJYmDvoWkw+WpWs0zrMy5jVtMFd IxWA== Received: by 10.50.46.232 with SMTP id y8mr7454075igm.57.1341239625948; Mon, 02 Jul 2012 07:33:45 -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.24.148 with SMTP id v20csp23843ibb; Mon, 2 Jul 2012 07:33:45 -0700 (PDT) Received: by 10.68.202.99 with SMTP id kh3mr30565826pbc.157.1341239625362; Mon, 02 Jul 2012 07:33:45 -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 tg7si22032385pbc.219.2012.07.02.07.33.42 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 02 Jul 2012 07:33:45 -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 rr4so9083818pbb.37 for ; Mon, 02 Jul 2012 07:33:42 -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=a6fTBox5rhoENW2CX+gRNrCmmxL8fF2fGhYy56Tvfns=; b=AVR5Hk2oU/u3c5S9oAY8OzsBgBSMXgA/JTVEAL1/kGMdOezWNlZndDGbWCgDbWT8GP uCp5VIl1eQwCQcHTq1GK931hBpEpMvV6cEQ75MAodebczlToxzfpjgfwoTb6eXmm25GI P6wjb20XdwcYVZI8TjyNZ/gageYJaWIbbpwEvWXBb6cEdN590BnQju3/C9bk2NJpzJHq +j9CjolEpSAiWtI/cYE72biem9flQp3y8nqGvKiPtwEJQU6q0AIEbHnkZpZ2LBrXFGu7 zOJySHxWAVO3ZFnnAYDn+lnjHApBk57ZMkD1G+nz3mAXIyFctpFIhyhi63ALteVS82Tb cOPw== Received: by 10.68.231.10 with SMTP id tc10mr30840814pbc.107.1341239622378; Mon, 02 Jul 2012 07:33:42 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id io2sm13127756pbc.24.2012.07.02.07.33.36 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 02 Jul 2012 07:33:41 -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, yejin.moon@samsung.com, dsaxena@linaro.org, ilho215.lee@samsung.com, nala.la@samsung.com, stephen.doel@linaro.org, sreekumar.c@samsung.com, Vinayak Holikatti Subject: [PATCH 4/4] [SCSI] ufs: Correct the expected data transfer size in UPIU Date: Mon, 2 Jul 2012 20:02:52 +0530 Message-Id: <1341239572-7408-5-git-send-email-vinholikatti@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1341239572-7408-1-git-send-email-vinholikatti@gmail.com> References: <1341239572-7408-1-git-send-email-vinholikatti@gmail.com> X-Gm-Message-State: ALoCoQmmhVoPDo9JKTYzMvDstUKsWYIc8PWdm3NVouh56ciCTOyuiz4sEzzxrmtLQR2yuIJYbaGj 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 files changed, 1 insertions(+), 1 deletions(-) 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,