From patchwork Wed Jan 22 15:00:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 23535 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3DABC218CB for ; Wed, 22 Jan 2014 15:00:44 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wp4sf1600945obc.9 for ; Wed, 22 Jan 2014 07:00:43 -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=VDCJfFQyl8mhhgv24Ij1djCqhu5QJSttLq9pQetnRba1Nqzi6e5FqXk+jmhWCx0uqk p4/LsoP5q+cpOQ7AdIhzTgEDrjSo4oaJ4nBlWPRqnX/2VvYzT17rW/rX0XXL3we9TCaC SHcBY5RSNthuSMXjGyntpf5loL7/96Mfv48lCJ1zKlR8a/+rUd5r96wD/kyetkDM1Y/S Hqc4Db0H3e8JxaNOaylpprefmHcbWk/oWztpkC8U8s6w3q3iBdfEUvSwZmjfx10yP9f4 7bvsaKtjyCF8y/6INVOqOAoG4YBzyxXwY0K3OhqjZQ5Of4zLVwlbrQo3bQGpi74Oa4ga I7fg== X-Gm-Message-State: ALoCoQmEwkleGufbmQwVGoQ0g7MSq7BQvDXzJFsoUhGFJTXHXt+RVwWW/yX6rzKFXOABWpk9h37s X-Received: by 10.183.3.36 with SMTP id bt4mr700411obd.29.1390402843366; Wed, 22 Jan 2014 07:00:43 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.161 with SMTP id o30ls78786qga.94.gmail; Wed, 22 Jan 2014 07:00:43 -0800 (PST) X-Received: by 10.58.229.164 with SMTP id sr4mr1236685vec.18.1390402843254; Wed, 22 Jan 2014 07:00:43 -0800 (PST) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id x16si4688137vct.105.2014.01.22.07.00.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 07:00:43 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.51; Received: by mail-vb0-f51.google.com with SMTP id 11so274169vbe.38 for ; Wed, 22 Jan 2014 07:00:43 -0800 (PST) X-Received: by 10.220.98.143 with SMTP id q15mr376092vcn.38.1390402843175; Wed, 22 Jan 2014 07:00:43 -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 u4csp190330vcz; Wed, 22 Jan 2014 07:00:42 -0800 (PST) X-Received: by 10.194.222.38 with SMTP id qj6mr2293549wjc.66.1390402841168; Wed, 22 Jan 2014 07:00:41 -0800 (PST) Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by mx.google.com with ESMTPS id hh3si7010417wib.75.2014.01.22.07.00.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 07:00:41 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.172 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=74.125.82.172; Received: by mail-we0-f172.google.com with SMTP id q58so407045wes.31 for ; Wed, 22 Jan 2014 07:00:40 -0800 (PST) X-Received: by 10.194.92.164 with SMTP id cn4mr2299382wjb.74.1390402840749; Wed, 22 Jan 2014 07:00:40 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id dd3sm15401824wjb.9.2014.01.22.07.00.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 07:00:40 -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 07/10] mmc: card: Use R1 responses for stop cmds for read requests Date: Wed, 22 Jan 2014 16:00:21 +0100 Message-Id: <1390402824-9850-8-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1390402824-9850-1-git-send-email-ulf.hansson@linaro.org> References: <1390402824-9850-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.212.51 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)