From patchwork Wed Jan 29 22:38:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 23906 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2C2FF20300 for ; Wed, 29 Jan 2014 22:38:31 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id le5sf5471227vcb.7 for ; Wed, 29 Jan 2014 14:38:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=hALE2kwt+9HdNO7QDkIgHzh6VERDLvwmISpgXvIgWyg=; b=N2lv2t2C1M3IYiPvdjzgj9cFOMtDxWnhUpiJ0Srntfuq5OxHFteuVFbqrJgNW0lOjU WgtBBS8ANeTGUftwdTZbxttDHjdjyCoUoE8dW9TZ1R4B069xTdhn4MwFKdrDkCVoe8K+ 3DaUrWG6pldPlOGUCA4T/HZIGrA0Qqt+/7MuCeqmFxTAWxXF+9kO+NUVOV2D59DPd7tC xFdk/4Vl/jXW8XsnTZjcRyCXLNn0B2Iro5rml1v0mp9fhxBQJbX+zDs1QDfoB+/GD0MU zyB82rP8lEy6wTBau6L2dd8N92x8T4+piOt7ReorNYqAsV4TwRjcPxdPT1hxLVvLRMrw qaYQ== X-Gm-Message-State: ALoCoQkh+w5mkOLtO+FxpbGjkRKCn0ey87namebonukRONiBBGlkoVdt7sBEeNdvLACQy1NNifL9 X-Received: by 10.224.167.196 with SMTP id r4mr3924987qay.8.1391035110384; Wed, 29 Jan 2014 14:38:30 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.69 with SMTP id n63ls326948qge.96.gmail; Wed, 29 Jan 2014 14:38:30 -0800 (PST) X-Received: by 10.52.236.132 with SMTP id uu4mr118608vdc.47.1391035110277; Wed, 29 Jan 2014 14:38:30 -0800 (PST) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id a15si1255641vew.7.2014.01.29.14.38.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 14:38:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id db12so1620803veb.39 for ; Wed, 29 Jan 2014 14:38:30 -0800 (PST) X-Received: by 10.221.55.8 with SMTP id vw8mr8741815vcb.8.1391035110193; Wed, 29 Jan 2014 14:38:30 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp152474vcz; Wed, 29 Jan 2014 14:38:29 -0800 (PST) X-Received: by 10.152.219.37 with SMTP id pl5mr783893lac.36.1391035108262; Wed, 29 Jan 2014 14:38:28 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) by mx.google.com with ESMTPS id e6si1983968lam.24.2014.01.29.14.38.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 14:38:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.43 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id pv20so1985334lab.16 for ; Wed, 29 Jan 2014 14:38:27 -0800 (PST) X-Received: by 10.152.234.202 with SMTP id ug10mr529987lac.28.1391035107627; Wed, 29 Jan 2014 14:38:27 -0800 (PST) Received: from linaro-ulf.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id wt2sm3998221lbb.2.2014.01.29.14.38.25 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 14:38:26 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Chris Ball Cc: Dong Aisheng , Stephen Warren , Vladimir Zapolskiy , Adrian Hunter , Ulf Hansson Subject: [PATCH 08/13] mmc: block: Use R1 responses for stop cmds for read requests Date: Wed, 29 Jan 2014 23:38:00 +0100 Message-Id: <1391035085-2747-9-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1391035085-2747-1-git-send-email-ulf.hansson@linaro.org> References: <1391035085-2747-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , While using open ended transmission and thus ending the transfer by sending a stop command, we shall use R1B only for writes and R1 shall be used for reads. Previously R1B were used in both cases. Signed-off-by: Ulf Hansson --- drivers/mmc/card/block.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 7b5424f..87cd2b0 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -1335,7 +1335,6 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, brq->data.blksz = 512; brq->stop.opcode = MMC_STOP_TRANSMISSION; brq->stop.arg = 0; - brq->stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC; brq->data.blocks = blk_rq_sectors(req); /* @@ -1378,9 +1377,15 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, if (rq_data_dir(req) == READ) { brq->cmd.opcode = readcmd; brq->data.flags |= MMC_DATA_READ; + if (brq->mrq.stop) + brq->stop.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | + MMC_CMD_AC; } else { brq->cmd.opcode = writecmd; brq->data.flags |= MMC_DATA_WRITE; + if (brq->mrq.stop) + brq->stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | + MMC_CMD_AC; } if (do_rel_wr)