From patchwork Wed Nov 27 07:21:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180251 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5735489ilf; Tue, 26 Nov 2019 23:22:00 -0800 (PST) X-Google-Smtp-Source: APXvYqy9FNOpjXHelrh5sayvdNHLD3DQHbjiJ3pTt6Vy0bL/SOTpTbVRQGI//1Tgyt4YGeWF66Io X-Received: by 2002:aa7:d9cf:: with SMTP id v15mr4255944eds.182.1574839320073; Tue, 26 Nov 2019 23:22:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574839320; cv=none; d=google.com; s=arc-20160816; b=gv+AIioh7C8QKrn2eyuVWxT2ttixqKaNxaNGVBuw5BHN5CXYWgVmdxqtdQfNpXCs6e jOLBi913tRqyhPEyHI0cSsRTWkOfZ/mRklmOmTx/uyG7kAhRsggbUYK8L/mZAkhpDGG1 pk80kcOFbBlxjkbcQX2DdXESATODvpvfpAUZsLPlNaZ9Jjy71fcHJLHkKGHECPmnONOP AI2ylm6CQHv5g55ZyBeq/gkK8t4VLFYmr8mxwE93ldTrFTVVAQmHpV4xzNhQfzGfOvri Le1AjBiFbXIgX/T5Tu5bUkX2Va/9/qq2YrkHb81BNNRBCaVj9nnRa6FQnu3mKkKLwHCY 0vxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=en22Qz+GY6oZwRgNSeL3wdglbjbmHRAr7MDxv/V2MP8=; b=Ro7XnkP7E6/QePHRhCcER1gypjMSCHijs4AFOlnmI810m1sU9DyQeerDiZyil1aFjA SjLZ8RTKc/VJkbJDHPTmXlyZMuDWz7zZuZ/YGGqCJUyBWmpHn3/DqjCX5HIkoOZ9eHmW yj8lE8BireNNT3wtDmCwoWmoWRRuVthqyKm85iZcZye89Gdnwr+XEXgdW3qSmN0x3uLu ii4C+Ad0OLLua37gHJUJ0+xlP+nF+gdu24GaGQJDHWGngAbeR3w3qslOcWLrhRplgv8s MQzCIJBBBm2ytebqyP7ptI+pL1QRmZmvctdgXQTkpCNwiEJHZrXzIZRxSzYxjJ6oy91F cDnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w9vJW1En; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m19si69058ejc.66.2019.11.26.23.21.59; Tue, 26 Nov 2019 23:22:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w9vJW1En; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726296AbfK0HV4 (ORCPT + 15 others); Wed, 27 Nov 2019 02:21:56 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37983 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbfK0HV4 (ORCPT ); Wed, 27 Nov 2019 02:21:56 -0500 Received: by mail-wr1-f66.google.com with SMTP id i12so25433892wro.5 for ; Tue, 26 Nov 2019 23:21:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=en22Qz+GY6oZwRgNSeL3wdglbjbmHRAr7MDxv/V2MP8=; b=w9vJW1EnK+g6MeSQKgpBzWbqwgwZgvJVM6yxCn3GCkNWxr68xRj8SEakKGSxOrJ4Sl fa80J+t367tRd0olbeb2UJZqGDpfm5qOiHRlRPLGKeVLXcM3SYLwsMhOpB8iLyFuak8i qQplTEdykxtSGX17DZCjBjQDMVpWMVVqb7rEqOfwyH20InEEowS/kbPIp0+yT7kdzP4b cC3PxeS2HU6zDJUueRnnnO7r2cOHmWkzxMOcPsue9Nt5WIu8AcHA1Ehjc+JH8JT+kYSq eWPTpFcRcuYZltwTLjRlUCZe5dgAHn3M+soEsL589ar+AI4JGAA1qq6C5g64g5wNYm35 kfhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=en22Qz+GY6oZwRgNSeL3wdglbjbmHRAr7MDxv/V2MP8=; b=fu+K/WPF7Q5tWsYQmQ8ELUmVk7U98YFqg3SdMQbLEz5BGj5iaPw45+K8zAwRhF/XCg aK/PjCh7j6ZFwEGNvgIQAjzK+9oTonCTKAk9dg7B8fmuii0+V/dkA/Bl4X5T2YJp5Qq9 K9LMnMtO6CBOoEOdz4I46YnWHU42veRewumydFmlsKzRUzk3y8+nK5ic208kCqrgcoWU MCxXMq40sQHdoiGCQDoO0dbo70k8fWWSKf18wRuyEfaT54PcmoBFyekvwtURIFZZGNoj idbGQ0l5n0Na4cn1OOUOdhBS+U9afmAfeAoTV42n+EJdN4qjAHRilSgiLWDhCD9LxUs5 yxvQ== X-Gm-Message-State: APjAAAXwj6pbx48Mkv5d8FINxew3cE4hxdHHHID1ghVgyunzniKjzuaR oVQSZ1WhxGbJIAuaBDLe6WJFIj3PtHo= X-Received: by 2002:adf:db01:: with SMTP id s1mr38451271wri.372.1574839312771; Tue, 26 Nov 2019 23:21:52 -0800 (PST) Received: from localhost.localdomain ([95.149.164.101]) by smtp.gmail.com with ESMTPSA id y6sm18151872wrn.21.2019.11.26.23.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 23:21:52 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 5/6] mmc: block: Fix tag condition with packed writes Date: Wed, 27 Nov 2019 07:21:23 +0000 Message-Id: <20191127072124.30445-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127072124.30445-1-lee.jones@linaro.org> References: <20191127072124.30445-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Adrian Hunter [ Upstream commit d806b46e5f496a6335ebd7f8432d2533507ce9a2 ] Apparently a cut-and-paste error, 'do_data_tag' is using 'brq' for data size even though 'brq' has not been set up. Instead use blk_rq_sectors(). Signed-off-by: Adrian Hunter Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson Signed-off-by: Lee Jones --- drivers/mmc/card/block.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.24.0 diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index f600bdcaf5b4..07592e428755 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -1772,8 +1772,7 @@ static void mmc_blk_packed_hdr_wrq_prep(struct mmc_queue_req *mqrq, do_data_tag = (card->ext_csd.data_tag_unit_size) && (prq->cmd_flags & REQ_META) && (rq_data_dir(prq) == WRITE) && - ((brq->data.blocks * brq->data.blksz) >= - card->ext_csd.data_tag_unit_size); + blk_rq_bytes(prq) >= card->ext_csd.data_tag_unit_size; /* Argument of CMD23 */ packed_cmd_hdr[(i * 2)] = cpu_to_le32( (do_rel_wr ? MMC_CMD23_ARG_REL_WR : 0) |