From patchwork Thu Jul 26 08:42:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinayak Holikatti X-Patchwork-Id: 10247 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 543BD23F61 for ; Thu, 26 Jul 2012 08:44:00 +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 1B9E7A18ECC for ; Thu, 26 Jul 2012 08:44:00 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id z12so1696519ghb.11 for ; Thu, 26 Jul 2012 01:43:59 -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=UXE48UPu87ggO9aDTgf9c0gcZ+ertyOfvyNgwsR+jec=; b=VconLI8VykbLtlyGwyH2p5pxuaPhuky9Oowbr82d54rqqopvfw+Vmm5lOhWjyp3Vq8 aja5eUzgQkU3EbtfM5cg/TNXhD+HQwcqY4+/RcQyzt7Sy4lwSZtQrN5iTGBeZOMd3ApM hwITNL9ud8wsQhC0MlPMSeBrMWr9lGJn7B4kbF9iBI1a9yyibdhieCSHExEuK7W+6dqS dx8GjcoU2jfMd0fS+ABd1g8vAeExJsWKQvdKW58oFBBcnh4T4sZaAz4wTtuc0cIMNrGf KfsAwD0v66REHCWnALXZVFXK2xoz/aQAvaYE9E2Zoe3F6YQrT5WKQMl0UGOHEms7t3Im +iAA== Received: by 10.50.87.201 with SMTP id ba9mr968367igb.66.1343292239626; Thu, 26 Jul 2012 01:43:59 -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.43.93.3 with SMTP id bs3csp129861icc; Thu, 26 Jul 2012 01:43:59 -0700 (PDT) Received: by 10.66.89.166 with SMTP id bp6mr18885067pab.48.1343292238995; Thu, 26 Jul 2012 01:43:58 -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 tc8si38486893pbc.204.2012.07.26.01.43.57 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 01:43:58 -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 rr4so3300121pbb.37 for ; Thu, 26 Jul 2012 01:43:57 -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=UXE48UPu87ggO9aDTgf9c0gcZ+ertyOfvyNgwsR+jec=; b=NsfM0lozqFEXKu+srWbn9ULLfX0pvi2gjYlN23efpdGPXsDnb58/cEua2InRFHHutf i0jtD2X2ZWA04SZXvrBDw436yu0D66mGKEFVeXFcgI529K9hVwYITkqOw2L4hmTgjGZt j/7P4a8XoJFIMv8bfjmm3/QGnhQsCG+1+9Pw7FXLOshkCH05nijhwFYSSs3ULcK0PNtI qgdTaC1acX7aJkyzx5QoONmEwJ/9HXP7Nzcqr2Wh6bBVTPDQ3YOy3r6xedJkS20lfTDs nilCSgogJzuoSb8n36p2KX/j777otC1hspjpe/Yu4Yt9b818nz69xZekA65SmAxw/45d HoKA== Received: by 10.68.228.2 with SMTP id se2mr3116554pbc.109.1343292237498; Thu, 26 Jul 2012 01:43:57 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ny4sm16127173pbb.57.2012.07.26.01.43.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 01:43:56 -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 V3 4/4] [SCSI] ufs: Correct the expected data transfer size Date: Thu, 26 Jul 2012 14:12:50 +0530 Message-Id: <1343292170-2599-5-git-send-email-vinholikatti@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1343292170-2599-1-git-send-email-vinholikatti@gmail.com> References: <1343292170-2599-1-git-send-email-vinholikatti@gmail.com> X-Gm-Message-State: ALoCoQlohQn2Bksr+d4hAfrxY0RB3OO1xcuztIZmkYSDV5rc25saNL9LW7EE0ZiAAHc0hWxju+HB 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: Namjae Jeon Signed-off-by: Santosh Yaraganavi Signed-off-by: Vinayak Holikatti --- 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,