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: 9961059 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 640AB6056A 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 5671028FF7 for ; Wed, 20 Sep 2017 08:02:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B52F28FFB; 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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable 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 A6B6328FFC for ; Wed, 20 Sep 2017 08:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751578AbdITICV (ORCPT ); Wed, 20 Sep 2017 04:02:21 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:54576 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751580AbdITICT (ORCPT ); Wed, 20 Sep 2017 04:02:19 -0400 Received: by mail-lf0-f45.google.com with SMTP id k23so1861150lfi.11 for ; Wed, 20 Sep 2017 01:02:18 -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=OszA3HRnQ1v/XOicQ7KtCF/cQz6JG0Ejzw51ejjv0WEhA50Zk4GKKixK4tt2Jh4uro DgBVmyytoRp0t7BYfUquMnc9JQJYOPl/VycMbUXtGp1px+yMv0DhNVHDGcgmyZjaAPym aqESIk/WpQTqho53klU24Ii0d5/9hRWJDU6vlDbYWx3NgcPxZpS2wu02cJC3xKvrd00r srZmfXciADx0Ye4sc9pd20A+UuM3/9uR1gdL+1GP77SIUWdCVun4Te4iTdycKL/2FwsH luTGnHK+Jd7rKJ2feOpUxJ5TQLxK9EnvpQCzQkZpmq7f5Tl+CJBuyQDAHzTyc6YZLUiW 6ZYg== X-Gm-Message-State: AHPjjUhcI/GzQQCgY6a1XeVSsZ9dRRyf5OMnsMRRvwihOzb9Z2xm+cFk GX4mFj2w8gk936MydjQ5rW2ijg== 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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@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