From patchwork Wed Sep 20 08:02:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 113085 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp470846qgf; Wed, 20 Sep 2017 01:02:23 -0700 (PDT) X-Received: by 10.98.214.23 with SMTP id r23mr1300261pfg.195.1505894543334; Wed, 20 Sep 2017 01:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505894543; cv=none; d=google.com; s=arc-20160816; b=UbBpaY0yqOFQFoFCWifiUKfmNXfrCibkUmR4YvjPfFSpKrjjobQqfrz7eSwM6jI/oA +cmpLjf8WIVP0pTB0PXi2Ut6o4f1yG3157iNTQnXhNATWdQuRcSeaAS80gDId5P56ahi Q0qsh1QJjt0qJXuH2Wo9eThUqAX96M+7gGks32NoGt8qlHYH+5JXaG90qSfk5FgtBWy9 0y8sNmNRLX57VrdQU31tS8q4XcRAfD8VKqLFVwp1Vs0wfPdKzxxe6VSbHzqXDwwgsTxs ymJBAKoaKXr3Dg3D3bD7B9FEG0KONLV7TGxafSnRbtiYcHOel9vLu4CGXF7s9ESrqhEF d0lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=fTU+B71xGlxYtFYueyUdLruy3wRu5QsSeAQrI9Q3eAw=; b=nbNQsBjxnBOttWz/UMlenHOzRYgXJC0uYC706a2HwMofLzQtRoKagQ5lXdS8e0oH1J cGcXkb+4rfM8Uv9tONo8OqJw/bQL1v1Za1uRnrI6WCtus72MqnTtl5xyEDc7bIXX9vMU qCmOWAOWgeoPewbvxV3UL2NaYyerz2A11V2gvX0ltX7VQnssa8QgIixYGzVe2V7wIrRb LrkN3henuE90ERpvhS2LofiIYH9K9IDIrxuxZL4FONvtNMbzxfy/HiMaUJjX1/yB3e+3 OSt6P75zUNE65v1wp+jcDMKWu6pJhQFjkWsTetEO+6xrfWANf9iuzL1wg5NZ3xjXdI2W tHKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JPYifst9; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (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 p13si848400pll.319.2017.09.20.01.02.23; Wed, 20 Sep 2017 01:02:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JPYifst9; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751595AbdITICV (ORCPT + 6 others); Wed, 20 Sep 2017 04:02:21 -0400 Received: from mail-lf0-f50.google.com ([209.85.215.50]:45506 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751645AbdITICT (ORCPT ); Wed, 20 Sep 2017 04:02:19 -0400 Received: by mail-lf0-f50.google.com with SMTP id d17so1901273lfe.2 for ; Wed, 20 Sep 2017 01:02:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1E6mZ84eaaefv7zKqjtd7NmytHWzp0YO0TGHRvIdGzw=; b=JPYifst9DccWHNFZdrgVS/bcZXwty6Dvuov8bs5NXbUUnCmfxsYsYzmwJ2Z/R9y7QP 8zairg38D7uwdjo7d5+B10O3LoUeAVYifm+FIlY4/bC58IqBoULgSAqSZKHStfrc8WgF lkcewTU1ah8O22IW6KCQfqsFwFbhtgfchH5kI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1E6mZ84eaaefv7zKqjtd7NmytHWzp0YO0TGHRvIdGzw=; b=Mf833FFpp1uW5vdZ8l4VTekM7AdqF80hb1sikI3Qz1UOsNSNnIs/ArpaaXFC35zRm5 Hs0/FbcDwLkZx3M34cQxx4P+8BlsBbKGeL1AHH+7xb6UTwPLTa90SGT6F9NLWK1p4wHO 515zd4DpGZ8Msqv1ihEpHOLNc0k5V5dKh/EjQcIKbsnfowYQcwC4Aay+xq0n4TynTH0X rGCHATGBDzqRS1u7sSxp6chIaPUu9qFEKNkhnnDQKGO7q38w0dMcxKo3P9pVJZFC2f+G SqlKb8jZ9WRoN0Pj30kif4XsQBpzxPJ0ae017SD4I8CoJuPRou6Q5Ygfy2H/XZvzki+C aJrA== X-Gm-Message-State: AHPjjUhgEGFVMHYPyZ7Q37v6SK6Kipq+GMDXfI7i3aw5Qvm4jOHPcNgx Cq0MC9SYJemVS0M9FqsK5gGb2INuXxk= X-Google-Smtp-Source: AOwi7QD4E1BI5KIrYrROqz5fIJMLef+YyyyL1hB+f267vnXjTFMwje57Jcs9qAMX8H5zs0HPyhkYzw== X-Received: by 10.46.82.15 with SMTP id g15mr1804749ljb.135.1505894537923; Wed, 20 Sep 2017 01:02:17 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id e22sm289338ljb.93.2017.09.20.01.02.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Sep 2017 01:02:16 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: linux-block@vger.kernel.org, Jens Axboe , Christoph Hellwig , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Paolo Valente , Avri Altman , Adrian Hunter , Linus Walleij , Tomas Winkler Subject: [PATCH 2/2 v6] mmc: block: Delete mmc_access_rpmb() Date: Wed, 20 Sep 2017 10:02:01 +0200 Message-Id: <20170920080201.32438-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170920080201.32438-1-linus.walleij@linaro.org> References: <20170920080201.32438-1-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This function is used by the block layer queue to bail out of requests if the current request is towards an RPMB "block device". This was done to avoid boot time scanning of this "block device" which was never really a block device, thus duct-taping over the fact that it was badly engineered. This problem is now gone as we removed the offending RPMB block device in another patch and replaced it with a character device. Cc: Tomas Winkler Signed-off-by: Linus Walleij --- ChangeLov v5->v6: - Update the commit description with an accurate description of why this was done in the first place, and why it can now be removed. ChangeLog v1->v5: - Renumber to keep together with the rest of the series. --- drivers/mmc/core/block.c | 12 ------------ drivers/mmc/core/queue.c | 2 +- drivers/mmc/core/queue.h | 2 -- 3 files changed, 1 insertion(+), 15 deletions(-) -- 2.13.5 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 6421d06b66bb..48521376b17e 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1203,18 +1203,6 @@ static inline void mmc_blk_reset_success(struct mmc_blk_data *md, int type) md->reset_done &= ~type; } -int mmc_access_rpmb(struct mmc_queue *mq) -{ - struct mmc_blk_data *md = mq->blkdata; - /* - * If this is a RPMB partition access, return ture - */ - if (md && md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB) - return true; - - return false; -} - /* * The non-block commands come back from the block layer after it queued it and * processed it with all other requests and then they get issued in this diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index affa7370ba82..3baccbf16f3d 100644 --- a/drivers/mmc/core/queue.c +++ b/drivers/mmc/core/queue.c @@ -32,7 +32,7 @@ static int mmc_prep_request(struct request_queue *q, struct request *req) { struct mmc_queue *mq = q->queuedata; - if (mq && (mmc_card_removed(mq->card) || mmc_access_rpmb(mq))) + if (mq && mmc_card_removed(mq->card)) return BLKPREP_KILL; req->rq_flags |= RQF_DONTPREP; diff --git a/drivers/mmc/core/queue.h b/drivers/mmc/core/queue.h index a2b6a9fcab01..7649ed6cbef7 100644 --- a/drivers/mmc/core/queue.h +++ b/drivers/mmc/core/queue.h @@ -89,6 +89,4 @@ extern unsigned int mmc_queue_map_sg(struct mmc_queue *, extern void mmc_queue_bounce_pre(struct mmc_queue_req *); extern void mmc_queue_bounce_post(struct mmc_queue_req *); -extern int mmc_access_rpmb(struct mmc_queue *); - #endif