From patchwork Thu Jun 15 12:12:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 105647 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp772356qgd; Thu, 15 Jun 2017 05:13:40 -0700 (PDT) X-Received: by 10.84.253.2 with SMTP id z2mr6076882pll.114.1497528820664; Thu, 15 Jun 2017 05:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497528820; cv=none; d=google.com; s=arc-20160816; b=hXRARBv+0RwDVwAfsC6Ns3N4Mb1JrXKbmqQA7qf/dtSlrb5ncMIJY4zgm6Y9RIjsWe j+IxhEkuib5/+I2ASgzSp8YDfivHRZJn+Tn8QC1Acpox5NrlqPrVaIlRXr6iYMzqdPFI 8x+3ttRkGAxcwVDk0Fgp71tuhE/nVPjxW+mLDMgj90+A1ieQdz7EJEn0jmx0NhbKNjmx 9nHwcXsvGfskfv56YG2FvBaRy5a2VIlplOmR8ssfvpW8mePkcnQcbRNaXsBF6LoOnp7K vTHclK6zy28H7lfznn3nfFguAnxK0YPci+QC7Gxuw25E8A+8+XpbPaF/sHF4ycj80IU6 Y5QQ== 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=NTsvMRtWRvZoHkGOId6sd2POOmLSjRKqqHgeYaai2cU=; b=S+AOzA+LRclCJOMRUIax9IzGzavlH+BMyo8E0wubRv/7zJZ/c+ulHR/hu7ZGPpMPoU oAoLSD/IcB/EZ1OOy0pmDT1ddcor0X8kZu+Qd9miDJt6ZydShyMN9pR+My3whh6fRFjR vnRrdLW/ZBv89SgaqsZW5pQFOWdPwb+6LZ2pE6+y4O4uOHh8ZMFgNcP6CZ7qNey5BeST +X7kP9R/HUiw5pm3gjvKRLQlKRGUbhKZkrU/myI1+nijbbjMYgBJm+pi4C8/4fFOwLyS 8VEwz6pnxAb7xXocUQZRrsJ1c4k15+IBkm9NZlcdwWOv3z4vLHBta9cAUyce54hfjZsD 8trQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=GLOJxd79; 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 f5si2148803pfb.416.2017.06.15.05.13.40; Thu, 15 Jun 2017 05:13:40 -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.b=GLOJxd79; 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 S1752387AbdFOMN1 (ORCPT + 6 others); Thu, 15 Jun 2017 08:13:27 -0400 Received: from mail-lf0-f52.google.com ([209.85.215.52]:34120 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752498AbdFOMNV (ORCPT ); Thu, 15 Jun 2017 08:13:21 -0400 Received: by mail-lf0-f52.google.com with SMTP id v20so7985617lfa.1 for ; Thu, 15 Jun 2017 05:13:20 -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=6q6I3xJhWga1oMui928GQbok6fmtkANH/+gYZOt5sd0=; b=GLOJxd79OXTtCbJaE/X4kZYFuA7it+XVSHSF4G4Y45LaLU9bYjF/fRjUkTzuc2UtNy 456n4OZORlhNkTrBlqpY6DPa24s9RsKOEfv2pUvOUreWGiTBztyYj/Ur+IvDL/0cGfVT +E8Naq7hLoDrhgpAIYnUPPDGMhqUI39sfQCJQ= 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=6q6I3xJhWga1oMui928GQbok6fmtkANH/+gYZOt5sd0=; b=c90BjuwS7IDGFKH+eksArcQlD5jlEBhs+BA21ZnNnXE6DTp8Aq6jhHpNeJP/694Yzr zCKj7FTpsiKihbkz7+DJZyLD5WR8r0zfCI4dlXSVrB+vzCHL3psQwIT/ylTedx+1z3G8 D5d8Y2LvBhr0ARcTUPe9dWYBR6U2DIw31+PWrk6F6rTpOkoE9HTzqJw2p9irI2JBEqq+ 4/W3idzsVS+Q6iy2rwknDMcWpq34dPtVUX/WFBsdQ+U842LHfhGkI1mYZihH4pyAaarV Y4VHFB6vE4QIRPqLLVAZYcb5DswnVxxfPjhCJmASmvDmLDJES6n7xQe3xp28czI4KLh4 eNuw== X-Gm-Message-State: AKS2vOyXQOm6w12Fempn95mHgJKwZrlVwQiAAD4MsFKhwK2oasbrXW0g nY3clBmRdPTM6cNGhkMwLQ== X-Received: by 10.25.205.80 with SMTP id d77mr1740085lfg.131.1497528799201; Thu, 15 Jun 2017 05:13:19 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v1sm597574lja.18.2017.06.15.05.13.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jun 2017 05:13:18 -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 Subject: [PATCH 5/5] mmc: block: Delete mmc_access_rpmb() Date: Thu, 15 Jun 2017 14:12:59 +0200 Message-Id: <20170615121259.8281-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170615121259.8281-1-linus.walleij@linaro.org> References: <20170615121259.8281-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 --- This patch is not an RFC since it is a logical consequence of the RFC patch, not really much to discuss about it. --- 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.9.4 -- 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 0a226bc23429..8bb97ac3be08 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1196,18 +1196,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 ba689a2ffc51..9d3de2859c33 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