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: 9961057 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3599860234 for ; Wed, 20 Sep 2017 08:02:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E2DE28FF7 for ; Wed, 20 Sep 2017 08:02:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12C6F28FFB; Wed, 20 Sep 2017 08:02:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 866FD28FF7 for ; Wed, 20 Sep 2017 08:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751595AbdITICV (ORCPT ); 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 X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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