From patchwork Sun Aug 20 21:39:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 110491 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp521554qge; Sun, 20 Aug 2017 14:39:38 -0700 (PDT) X-Received: by 10.101.90.73 with SMTP id z9mr14764649pgs.450.1503265178756; Sun, 20 Aug 2017 14:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503265178; cv=none; d=google.com; s=arc-20160816; b=WGGwM265yHGIOM5RzYrbzlQpFbGSytpdZyP208OfqQRKoSiTPVjpUtBT6wqhvhIvpp rjk8JiL4fCQQChZcBd2IF4OzcHrQXQcS2/kJc0gA/sKZKmTt9eq3j/Log2XBb6WRO7Hx NJtPjBClO2YyZJmXAg3pntVuGihXv/PwIQupVqWjs2Rh1eV+skrRL7UvXvFtjM5js7Ox lA2uL/tcmjZhyDUhc3k2wRgirNL85Isk9ZahFJ2LXS/nOEkIMThqeDcmPIfcmZvpbUm7 4C8nwzGEhE//6gMNJwL/w5Ord5dfNhsE4majaE4O3cnxcLZvT+9rL9UVCfc6SZ3wCOTg oiVg== 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=/RT8H+3q/PhQYQ/7OlKPw/Y+q3Ihgbz842nxngfCCts=; b=BvJnz5RPONnkHFngP90ZSAjVN5Wi0blEaP5g/bzIrDFvrBhSz7t4uZJSPWoLHxyGrl S2PnBfL5seiufZOikuRPpkT1qg0NuRKtipxT4+XekAewtZ15XYsSZGSx0UrMAMR8+CdN V6VBzaMrsLzaSLiyEgYufzHzkDCO4DDkvVcff+tsXPNDh0TM7YBVDh0E0ETbULPU7+5L mFVfm+o/DJlZeXxePLqX7bvbI62ah1/tNFcZYNSYZw3EM7l6lXge5mif6Z0QlPTuzE2f aBGQ//Lz6XmImO1tJ/ITTg8b+Fglfr/DzqWnKk6h7R6LtjQKQtmdyZyel0xCy7tVAx+y gnPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=P1JYD/Nu; 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 z1si3544613pgn.611.2017.08.20.14.39.38; Sun, 20 Aug 2017 14:39:38 -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=P1JYD/Nu; 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 S1753351AbdHTVjh (ORCPT + 6 others); Sun, 20 Aug 2017 17:39:37 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:35556 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753362AbdHTVjh (ORCPT ); Sun, 20 Aug 2017 17:39:37 -0400 Received: by mail-lf0-f45.google.com with SMTP id k186so4087924lfe.2 for ; Sun, 20 Aug 2017 14:39:36 -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=iI9v4tlfZJPxaZNeHIRXFr+h9DpSZg2X+cQ5NGXr0Bs=; b=P1JYD/NuSXWs8+wzCNapqWgN4gQErhoE8FvanwWSB9K/fJZUfTz1Ba/0gThccLQ9BA k9kYGRJaWaHH7ajNYuBK88a753OPElKnenrvAFZK6Z6fvDfW4H58/ahUyJKHW0EEWBAW 4bU3aidYdDRNlFswVgTASyNcCY4zfgsmyxDfc= 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=iI9v4tlfZJPxaZNeHIRXFr+h9DpSZg2X+cQ5NGXr0Bs=; b=Kc0N1dfypjdOO+Osky/GVRqIBf7pL6DMuSRaAsn2C0W1kzUiRW/abT/GuZezy1qYCD ZbD9sAxaGR1WLpLWOsmofmtz2QtzGLTS3+0byOdSZS8VxNZ6lt3sNFuw/WODJsDl9XSM +AKxSBWRR2XhR7RUPgWP1V38osGs2HU9h1yBaxGfPXyCnCSwfi3d1aoC+UJ+N87KRzf+ Tzmj4IrjMlcTGmYw0K6m5JhcC/lb6KfHJRO40En3jEjYU6gPiDDElaV1RK2vyqz73bi4 goG5ueQwRIJ4tslkcNs4fOK0uh4p5e0KHrl8j0Jdkth4FEsZEWuC8tk0y/uuRa3yvO4/ UkmA== X-Gm-Message-State: AHYfb5iwboeLJZdFv9Zt/NljbFC70Kf4u8qFfbD7qrya0bzWXqrCwVLt dyVDHF6oy6H/45JmaEw2Iw== X-Received: by 10.25.232.41 with SMTP id f41mr6189607lfh.90.1503265175491; Sun, 20 Aug 2017 14:39:35 -0700 (PDT) Received: from genomnajs.bredbandsbolaget.se (c-097b71d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.123.9]) by smtp.gmail.com with ESMTPSA id f136sm2381830lff.34.2017.08.20.14.39.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Aug 2017 14:39:34 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Linus Walleij Subject: [PATCH 8/8 v5] mmc: block: Delete mmc_access_rpmb() Date: Sun, 20 Aug 2017 23:39:13 +0200 Message-Id: <20170820213913.9737-9-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170820213913.9737-1-linus.walleij@linaro.org> References: <20170820213913.9737-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 an RPMB request. However this makes no sense: RPMB is only used from ioctl():s, there are no RPMB accesses coming from the block layer. An RPMB ioctl() always switches to the RPMB partition and then back to the main partition before completing. The only (possible) use of this check must have been to duct-tape over a race between RPMB ioctl()s colliding with concurrent non-RPMB accesses to the same device. This could happen in the past because the RPMB device was created as a separate block device/disk with its own submit queue competing with the main partition, and submitting requests in parallel. This is now gone as we removed the offending RPMB block device in another patch. Signed-off-by: Linus Walleij --- 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 27e1cf07a7a2..61ea402f2569 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1207,18 +1207,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