From patchwork Tue Jan 24 10:17:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92320 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1624269obz; Tue, 24 Jan 2017 02:18:13 -0800 (PST) X-Received: by 10.84.179.99 with SMTP id a90mr9675925plc.139.1485253093552; Tue, 24 Jan 2017 02:18:13 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si7259622pfb.261.2017.01.24.02.18.13; Tue, 24 Jan 2017 02:18:13 -0800 (PST) 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; 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 S1750939AbdAXKSM (ORCPT + 5 others); Tue, 24 Jan 2017 05:18:12 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:36203 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932AbdAXKSL (ORCPT ); Tue, 24 Jan 2017 05:18:11 -0500 Received: by mail-lf0-f50.google.com with SMTP id z134so108124968lff.3 for ; Tue, 24 Jan 2017 02:18:10 -0800 (PST) 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=Pz6iO21qQtL7RmH1/kw98a7PmY6Q3PGJ+uqoyejdsPw=; b=AJET63nRl2OBYruTz4YrD+h8oUwEFEqphQoUAK4AaKMDyxPoytlTLGoVOm2YWicn+Q 8tkm3w4snORm7ITiGRASmtQchOUEfAgG+nAx8TB8JW98b8nWcXbnawshGQCXHbPjqdg/ B6j0XtTNdZyfKTc0ZDmrZRKYs55vBwSNZ4k2w= 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=Pz6iO21qQtL7RmH1/kw98a7PmY6Q3PGJ+uqoyejdsPw=; b=T00tnN7GDQlIgVccLfHAxuqQUCtqprnRPVIKygcpwbXuCSdQPwIxKYZhIxAT24T/SQ J33os8i1pnRJoTrOf14XNa7Nm9vLsU6bqA3gX27qYjB2q0d37TDGKkZRabpIRazT62HU QeuKH9rAlSrJwC5jIRiWftPbmlvrph6PGwwXkFr3eY0JsD/2sug+y6929Ut9ubeQlcUf 8e2s6a6d6kYmjPY8v4jAxA0us8lb2cijjzltSyVDzI/TdHdcGBRCKlX2gEGMVviw1cV6 fswYP3zhCWHdEHbK3C608ere6shB4fBVCml7YAIkMxqfzqe51W/QlX4XorJjBHN7TBDe lv2w== X-Gm-Message-State: AIkVDXKz8FemamvX+niIa2KUQTg4Hlbt99fGrS08GM070HDbmY9BDJRGOcCxOPCFqVgmZyoA X-Received: by 10.46.71.207 with SMTP id u198mr13067403lja.42.1485253089606; Tue, 24 Jan 2017 02:18:09 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o91sm7410797lfg.17.2017.01.24.02.18.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 02:18:08 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, linux-block@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Paolo Valente , Linus Walleij Subject: [PATCH 1/6] mmc: block: break out mmc_blk_rw_cmd_abort() Date: Tue, 24 Jan 2017 11:17:52 +0100 Message-Id: <20170124101757.19676-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170124101757.19676-1-linus.walleij@linaro.org> References: <20170124101757.19676-1-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org As a first step toward breaking apart the very complex function mmc_blk_issue_rw_rq() we break out the command abort code. This code assumes "ret" is != 0 and then repeatedly hammers blk_end_request() until the request to the block layer to end the request succeeds. Signed-off-by: Linus Walleij --- drivers/mmc/core/block.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) -- 2.9.3 -- 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 7bd03381810d..14efe92a14ef 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1598,6 +1598,17 @@ static int mmc_blk_cmd_err(struct mmc_blk_data *md, struct mmc_card *card, return ret; } +static void mmc_blk_rw_cmd_abort(struct mmc_card *card, struct request *req) +{ + int ret = 1; + + if (mmc_card_removed(card)) + req->rq_flags |= RQF_QUIET; + while (ret) + ret = blk_end_request(req, -EIO, + blk_rq_cur_bytes(req)); +} + static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) { struct mmc_blk_data *md = mq->blkdata; @@ -1737,11 +1748,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) return 1; cmd_abort: - if (mmc_card_removed(card)) - req->rq_flags |= RQF_QUIET; - while (ret) - ret = blk_end_request(req, -EIO, - blk_rq_cur_bytes(req)); + mmc_blk_rw_cmd_abort(card, req); start_new_req: if (rqc) { From patchwork Tue Jan 24 10:17:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92321 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1624289obz; Tue, 24 Jan 2017 02:18:16 -0800 (PST) X-Received: by 10.84.164.231 with SMTP id l36mr50793328plg.33.1485253096594; Tue, 24 Jan 2017 02:18:16 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si7259622pfb.261.2017.01.24.02.18.16; Tue, 24 Jan 2017 02:18:16 -0800 (PST) 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; 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 S1750931AbdAXKSP (ORCPT + 5 others); Tue, 24 Jan 2017 05:18:15 -0500 Received: from mail-lf0-f47.google.com ([209.85.215.47]:32843 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750843AbdAXKSO (ORCPT ); Tue, 24 Jan 2017 05:18:14 -0500 Received: by mail-lf0-f47.google.com with SMTP id x1so21438760lff.0 for ; Tue, 24 Jan 2017 02:18:13 -0800 (PST) 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=gMw2d3WlT4rETEPf9o1ShAwGeEdYqxfb2joEfYkc2uk=; b=hqUAVOlU1jwNT9W1Y2XgEtqaIGCi/S4WH9Ox60bA1mJ404nZ7efmF9b5xKJ4Ap+cmm UYiRTKO5eq2kxGJyAw1bLF8q0Lqsif45oQp/M1N2qkHboAHNOnAAyL/lY8o7xDeqKsrI q+m/RT6x6USAHKmwIKmSito7Oe+5r+yJ5DVwU= 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=gMw2d3WlT4rETEPf9o1ShAwGeEdYqxfb2joEfYkc2uk=; b=CNNPH4tqLs6iLdvPi4O62Hyf3CHfzomMI3vnaICwaQ/PKL2aD9zMMc/nqE03UZDJO5 mHD5J4VgymEK3ysrvGDgRS1/Os/z5dXX1aP/g1xqMapsmsSPtCZjxrz3nEsy9STIZFSL ReR2nOjvLCEtyPgzzHGT+1NSGHYftjyyLElRx2vE4j/rU60hZcRKVTBQzx3QVT1Ujvut s+pxvB2STl6XrUUafJgbsWSWVvX88qgrtaMEbQMeuEDAtUmy/VwQov58pEXPdnXMZ0P+ aAyTpQ4XUQEaoUGWKOQN3xX3nnhLlLrWzRhed0ZqHGORmmrqQPRrKCYtTp/u9xmuaOB5 z2Lg== X-Gm-Message-State: AIkVDXJDnfDNh3lUQ6sJ3Ic8bqlApDPz6edwS4NzOWoVAACIj60PJBAPfOY/qGIFVzVYJsE3 X-Received: by 10.25.72.209 with SMTP id v200mr11225224lfa.74.1485253092842; Tue, 24 Jan 2017 02:18:12 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o91sm7410797lfg.17.2017.01.24.02.18.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 02:18:11 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, linux-block@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Paolo Valente , Linus Walleij Subject: [PATCH 2/6] mmc: block: break out mmc_blk_rw_start_new() Date: Tue, 24 Jan 2017 11:17:53 +0100 Message-Id: <20170124101757.19676-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170124101757.19676-1-linus.walleij@linaro.org> References: <20170124101757.19676-1-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org As a step toward breaking apart the very complex function mmc_blk_issue_rw_rq() we break out the code to start a new request. Signed-off-by: Linus Walleij --- drivers/mmc/core/block.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) -- 2.9.3 -- 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 14efe92a14ef..b60d1fb3a07a 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1609,6 +1609,22 @@ static void mmc_blk_rw_cmd_abort(struct mmc_card *card, struct request *req) blk_rq_cur_bytes(req)); } +static void mmc_blk_rw_start_new(struct mmc_queue *mq, struct mmc_card *card, + struct request *req) +{ + if (!req) + return; + + if (mmc_card_removed(card)) { + req->rq_flags |= RQF_QUIET; + blk_end_request_all(req, -EIO); + } else { + mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq); + mmc_start_req(card->host, + &mq->mqrq_cur->mmc_active, NULL); + } +} + static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) { struct mmc_blk_data *md = mq->blkdata; @@ -1751,16 +1767,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) mmc_blk_rw_cmd_abort(card, req); start_new_req: - if (rqc) { - if (mmc_card_removed(card)) { - rqc->rq_flags |= RQF_QUIET; - blk_end_request_all(rqc, -EIO); - } else { - mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq); - mmc_start_req(card->host, - &mq->mqrq_cur->mmc_active, NULL); - } - } + mmc_blk_rw_start_new(mq, card, rqc); return 0; } From patchwork Tue Jan 24 10:17:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92322 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1624307obz; Tue, 24 Jan 2017 02:18:19 -0800 (PST) X-Received: by 10.99.109.143 with SMTP id i137mr37756809pgc.11.1485253099114; Tue, 24 Jan 2017 02:18:19 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si7259622pfb.261.2017.01.24.02.18.18; Tue, 24 Jan 2017 02:18:19 -0800 (PST) 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; 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 S1750950AbdAXKSS (ORCPT + 5 others); Tue, 24 Jan 2017 05:18:18 -0500 Received: from mail-lf0-f47.google.com ([209.85.215.47]:34588 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750897AbdAXKSR (ORCPT ); Tue, 24 Jan 2017 05:18:17 -0500 Received: by mail-lf0-f47.google.com with SMTP id v186so108165860lfa.1 for ; Tue, 24 Jan 2017 02:18:16 -0800 (PST) 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=yPKkcMuzMsbiustzhJoXGYnVRUcv+qI1oydyp0QpwZc=; b=FKhzY0eqQA6CLooxGL/P8ByHTDr4/j2mGZa2pQUEcai4b49cp6Kxvu5JsSH3rvj7V0 8xMOmHQ4TOADABv4vOsZNGOMQ6CNlOjHnqYXYIJNvmDbG1B/iW5mHB6Hnl3/D7W1QIOB ZP91gEiQKbRlQMX0Raq7oxrgL9/3HYQFovMpI= 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=yPKkcMuzMsbiustzhJoXGYnVRUcv+qI1oydyp0QpwZc=; b=sVNdoLOh9ciOKE4JrIVF8eBOa3PLCpInxWbaNWpGBv8kBBs39fILOLEc+x+o+A3PuL na+qCUoGdEWsEk2dZbUyM4a4vdv3XUBgvlIvAVlJtv9v0pS2vCdGSeLlCqRQiw6/FlsP YSs71SQ72yWMdR+vMrtrlyXpHSy+1LNkbda2zIOPRhEY6yxT4p5QasLXfowfTDedmCYC QLsGaJQoRB4c6VJgIvUKPjdEv6vMbcina7KOQewpIttkvbK3iRJuqiz802wVBTyu+V77 VLxkBKKTEFKFxAY6GIuGSauamnJVSLX1XLCOnV2lQSK/nYoqlGeDLRRrBvAGvbvNs+gq ngcA== X-Gm-Message-State: AIkVDXIbFkr7LmFoGdwMUp7PdxreuQBrJSZ0faDDvuC3oXkK40NqavfMBDNyLH9r1NTKSedn X-Received: by 10.25.221.217 with SMTP id w86mr9767833lfi.141.1485253095552; Tue, 24 Jan 2017 02:18:15 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o91sm7410797lfg.17.2017.01.24.02.18.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 02:18:14 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, linux-block@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Paolo Valente , Linus Walleij Subject: [PATCH 3/6] mmc: block: do not assign mq_rq when aborting command Date: Tue, 24 Jan 2017 11:17:54 +0100 Message-Id: <20170124101757.19676-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170124101757.19676-1-linus.walleij@linaro.org> References: <20170124101757.19676-1-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The code in mmc_blk_issue_rq_rq() aborts a command if the request is not properly aligned on large sectors. As part of the path jumping out, it assigns the local variable mq_rq reflecting a MMC queue request to the current MMC queue request, which is confusing since the variable is not used after this jump. Signed-off-by: Linus Walleij --- drivers/mmc/core/block.c | 1 - 1 file changed, 1 deletion(-) -- 2.9.3 -- 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 b60d1fb3a07a..13e6fe060f26 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1649,7 +1649,6 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) !IS_ALIGNED(blk_rq_sectors(rqc), 8)) { pr_err("%s: Transfer size is not 4KB sector size aligned\n", rqc->rq_disk->disk_name); - mq_rq = mq->mqrq_cur; req = rqc; rqc = NULL; goto cmd_abort; From patchwork Tue Jan 24 10:17:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92323 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1624330obz; Tue, 24 Jan 2017 02:18:22 -0800 (PST) X-Received: by 10.84.179.99 with SMTP id a90mr9676769plc.139.1485253102290; Tue, 24 Jan 2017 02:18:22 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si7259622pfb.261.2017.01.24.02.18.22; Tue, 24 Jan 2017 02:18:22 -0800 (PST) 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; 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 S1750954AbdAXKSV (ORCPT + 5 others); Tue, 24 Jan 2017 05:18:21 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:35499 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750945AbdAXKSU (ORCPT ); Tue, 24 Jan 2017 05:18:20 -0500 Received: by mail-lf0-f50.google.com with SMTP id n124so107881650lfd.2 for ; Tue, 24 Jan 2017 02:18:19 -0800 (PST) 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=TLG/8Sbek+9PqeabAok0kUevFGjbn1kN0evrnvSBmGM=; b=Sj1Fa97MtObMn5SZ5jH0GdcpWEA4rTHFTNOCufzFaaxgFyf6hpTi70XEP/1A+OSPi5 xCvTWdK+VZ2P4EOt0/L2+lX9JiPFEJWe6NoxbN7rEwofvzvN5puYbcZYpQ+870rSSet0 rHJTBBLA0TIov51cNvUZpP698zrJk4LG3DoC4= 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=TLG/8Sbek+9PqeabAok0kUevFGjbn1kN0evrnvSBmGM=; b=nfbVmN9FiT+EWQfu0XSNybgumhWt+/kRKbl4XQBLikXNegJ7MWBfqBllu1wD1RHO0U hjb+VzFKdJzK/S6GwnHhQ/smW8ASbP76lwpP543zy2YiD+VpEYbgmfJAuZuKJTT41ooc gyh0HhxgUOqxYSLQ1otsX+v5hBuL3xF1evTDHJr95UKQMAzIG0ueagJ+dykV2j5aRz7Z 8IZiwRkILldPNRJXJvZYeoLu9M2b0rJ9ildP8WXeo3yVG0crEyh9VOc/YZ3i2Ge91+uW PRBKe0rDiPu8cES1ivQqMSp75B3GArU8j8l4abXpYO9Cxgm8I5WKE3K6lpYthnS8D5Ig mubQ== X-Gm-Message-State: AIkVDXL5Xbi+FxwJeBnYi3FO2hDEnxMLPj2taIPuVksg1yj+bxA8MuvnBdTF+2+pvZ8snnxe X-Received: by 10.25.104.20 with SMTP id d20mr10802715lfc.108.1485253098571; Tue, 24 Jan 2017 02:18:18 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o91sm7410797lfg.17.2017.01.24.02.18.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 02:18:17 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, linux-block@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Paolo Valente , Linus Walleij Subject: [PATCH 4/6] mmc: block: inline command abortions Date: Tue, 24 Jan 2017 11:17:55 +0100 Message-Id: <20170124101757.19676-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170124101757.19676-1-linus.walleij@linaro.org> References: <20170124101757.19676-1-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Setting rqc to NULL followed by a goto to cmd_abort is just a way to do unconditional abort without starting any new command. Inline the calls to mmc_blk_rw_cmd_abort() and return immediately in those cases. As a result, mmc_blk_rw_start_new() is not called with NULL requests, and we can remove the NULL check in the beginning of this function. Add some comments to the code flow so it is clear that this is where the asynchronous requests come back in and the result of them gets handled. Signed-off-by: Linus Walleij --- drivers/mmc/core/block.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) -- 2.9.3 -- 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 13e6fe060f26..4bbb3d16c09b 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1612,9 +1612,6 @@ static void mmc_blk_rw_cmd_abort(struct mmc_card *card, struct request *req) static void mmc_blk_rw_start_new(struct mmc_queue *mq, struct mmc_card *card, struct request *req) { - if (!req) - return; - if (mmc_card_removed(card)) { req->rq_flags |= RQF_QUIET; blk_end_request_all(req, -EIO); @@ -1649,9 +1646,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) !IS_ALIGNED(blk_rq_sectors(rqc), 8)) { pr_err("%s: Transfer size is not 4KB sector size aligned\n", rqc->rq_disk->disk_name); - req = rqc; - rqc = NULL; - goto cmd_abort; + mmc_blk_rw_cmd_abort(card, rqc); + return 0; } mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq); @@ -1660,11 +1656,20 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) areq = NULL; areq = mmc_start_req(card->host, areq, &status); if (!areq) { + /* + * We have just put the first request into the pipeline + * and there is nothing more to do until it is + * complete. + */ if (status == MMC_BLK_NEW_REQUEST) mq->flags |= MMC_QUEUE_NEW_REQUEST; return 0; } + /* + * An asynchronous request has been completed and we proceed + * to handle the result of it. + */ mq_rq = container_of(areq, struct mmc_queue_req, mmc_active); brq = &mq_rq->brq; req = mq_rq->req; @@ -1691,8 +1696,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) pr_err("%s BUG rq_tot %d d_xfer %d\n", __func__, blk_rq_bytes(req), brq->data.bytes_xfered); - rqc = NULL; - goto cmd_abort; + mmc_blk_rw_cmd_abort(card, req); + return 0; } break; case MMC_BLK_CMD_ERR: From patchwork Tue Jan 24 10:17:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92324 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1624348obz; Tue, 24 Jan 2017 02:18:25 -0800 (PST) X-Received: by 10.84.206.37 with SMTP id f34mr50644859ple.127.1485253105491; Tue, 24 Jan 2017 02:18:25 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si7259622pfb.261.2017.01.24.02.18.25; Tue, 24 Jan 2017 02:18:25 -0800 (PST) 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; 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 S1750965AbdAXKSY (ORCPT + 5 others); Tue, 24 Jan 2017 05:18:24 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:32892 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750947AbdAXKSX (ORCPT ); Tue, 24 Jan 2017 05:18:23 -0500 Received: by mail-lf0-f50.google.com with SMTP id x1so21440794lff.0 for ; Tue, 24 Jan 2017 02:18:22 -0800 (PST) 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=gz7tnq07zJ9ndl16kODpy5LyxxSK4/Ig/Iysr1h95GU=; b=Yrv1lbsBQA8mcks0TxP2rUqpNQJWj9Y06iheVlBdpEAxO6fXvWv1H3PniSo8vYpGZL m6Us+9UBfFZI8l48OJQl8sRnfUhnCgcRSWjjaet1CXeVWhWBDOkZLQOyPDpclWBRBjZv 9tZBRJDwxSBS7f6O1ZeslK3l96m89jgIbKGws= 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=gz7tnq07zJ9ndl16kODpy5LyxxSK4/Ig/Iysr1h95GU=; b=MLgsabmW/Zp9UFQw9nM4cqZ0ve9hdjSi5I0t1oHIQz31yvDSANSoIPjSrdfqZWenkf YZO79D8f/UpcZryntgnSe6aFO20iPOy20vxIAW6lhS4Ke2rMLVQnQnkNR317WSKV81Qy qnzeGnLpqqOETCHTwjaxNlaaAK4aoZqzqRDnYxSrpeq3H54ESWcKc00ecRrVEvoStua8 O4wbDZ5ZjAr02FRWVq/8FuibrmJrNj4VUJiNIZFHOV5NK/vqXH0nSp9m0+KksOpwDJQH cMjkV9s2r4LD4vCYkTvTAZJMush4fU8wYyVKM2Hyr6/wprE1J057wLsLDVI23EX5xjZ6 AU3g== X-Gm-Message-State: AIkVDXJb6LyiBgRVycVZGw9I0WcGSGduEeW6sN2/54CRgzG3SD/Bj53K40r2GRNG8A5d9Ic8 X-Received: by 10.46.33.136 with SMTP id h8mr13907712lji.57.1485253101696; Tue, 24 Jan 2017 02:18:21 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o91sm7410797lfg.17.2017.01.24.02.18.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 02:18:20 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, linux-block@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Paolo Valente , Linus Walleij Subject: [PATCH 5/6] mmc: block: introduce new_areq and old_areq Date: Tue, 24 Jan 2017 11:17:56 +0100 Message-Id: <20170124101757.19676-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170124101757.19676-1-linus.walleij@linaro.org> References: <20170124101757.19676-1-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Recycling the same variable in an x=x+1 fashion may seem clever here but it makes the code terse and hard to follow for humans. Introduce a new_areq and old_areq variable so we see what is going on. Signed-off-by: Linus Walleij --- drivers/mmc/core/block.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) -- 2.9.3 -- 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 4bbb3d16c09b..f3e0c778cdbd 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1631,7 +1631,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) enum mmc_blk_status status; struct mmc_queue_req *mq_rq; struct request *req; - struct mmc_async_req *areq; + struct mmc_async_req *new_areq; + struct mmc_async_req *old_areq; if (!rqc && !mq->mqrq_prev->req) return 0; @@ -1651,11 +1652,12 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) } mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq); - areq = &mq->mqrq_cur->mmc_active; + new_areq = &mq->mqrq_cur->mmc_active; } else - areq = NULL; - areq = mmc_start_req(card->host, areq, &status); - if (!areq) { + new_areq = NULL; + + old_areq = mmc_start_req(card->host, new_areq, &status); + if (!old_areq) { /* * We have just put the first request into the pipeline * and there is nothing more to do until it is @@ -1670,7 +1672,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) * An asynchronous request has been completed and we proceed * to handle the result of it. */ - mq_rq = container_of(areq, struct mmc_queue_req, mmc_active); + mq_rq = container_of(old_areq, struct mmc_queue_req, mmc_active); brq = &mq_rq->brq; req = mq_rq->req; type = rq_data_dir(req) == READ ? MMC_BLK_READ : MMC_BLK_WRITE; From patchwork Tue Jan 24 10:17:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92325 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1624370obz; Tue, 24 Jan 2017 02:18:28 -0800 (PST) X-Received: by 10.99.223.5 with SMTP id u5mr38486042pgg.58.1485253108706; Tue, 24 Jan 2017 02:18:28 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si7259622pfb.261.2017.01.24.02.18.28; Tue, 24 Jan 2017 02:18:28 -0800 (PST) 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; 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 S1750967AbdAXKS1 (ORCPT + 5 others); Tue, 24 Jan 2017 05:18:27 -0500 Received: from mail-lf0-f46.google.com ([209.85.215.46]:34640 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750956AbdAXKS0 (ORCPT ); Tue, 24 Jan 2017 05:18:26 -0500 Received: by mail-lf0-f46.google.com with SMTP id v186so108168064lfa.1 for ; Tue, 24 Jan 2017 02:18:25 -0800 (PST) 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=j3j7DeXByiwDcYt8bkir/JR2+Onpp9GazrR8DG+Jp90=; b=LB/ZfJROabAox/8GnVS9WDXGXMlO2HQC2vL3x29IBvi4OTWdofLmnTp7UAO882D/qL m7Nc56gjSmTLr3tG86sbTTZ44/ZNzPFwYfbPi5jCdd+k+Wn3m4iav2qmJp5b1Ejq4NM8 ozyGo/ENTUusIbwLno+3vIjfJDi6jmmsMAh74= 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=j3j7DeXByiwDcYt8bkir/JR2+Onpp9GazrR8DG+Jp90=; b=gWJ9IhYGbGhY6LDFIzeg6ShxYos8j29sIu03dbSYzv51JRNoALnr97K17+z6U6bVMe g5Ojn8+3A/Jg8dxAVtxnvGC2GOJXYnp7BWZhwuimVhjuSLmtckgJS7f30tAz2VgVfCQl q0kX3TkDgz3MBO5vajdtFU6rp/tjAOA94ru6MCt+BR9N2yazjf8sZIOvO/UB+YRCFmkS phtsuvaNZwhzGQEdmN3VtMiclJx8OrGdb83B9PAIecDBCHdRzd/kS7mhGKmXpwu0O3Jv VfyOM5WWBrHBvmvy2fTiX+j0ns0VOtU/Ph6QHuUrPFkv1z++VO36B6lyE4LqCLL96vDJ dOCw== X-Gm-Message-State: AIkVDXIy+o/krFdFDGuZZuIGY08lC9GPXDbdwzC5iKFk5ghyG/znZyf+2HpDsqQ7z7sNkt0L X-Received: by 10.46.83.19 with SMTP id h19mr14232482ljb.72.1485253104720; Tue, 24 Jan 2017 02:18:24 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o91sm7410797lfg.17.2017.01.24.02.18.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 02:18:23 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, linux-block@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Paolo Valente , Linus Walleij Subject: [PATCH 6/6] mmc: block: stop passing around pointless return values Date: Tue, 24 Jan 2017 11:17:57 +0100 Message-Id: <20170124101757.19676-7-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170124101757.19676-1-linus.walleij@linaro.org> References: <20170124101757.19676-1-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The mmc_blk_issue_rq() function is called in exactly one place in queue.c and there the return value is ignored. So the functions called from that function that also meticulously return 0/1 do so for no good reason. Error reporting on the asynchronous requests are done upward to the block layer when the requests are eventually completed or fail, which may happen during the flow of the mmc_blk_issue_* functions directly (for "special commands") or later, when an asynchronous read/write request is completed. The issuing functions do not give rise to errors on their own, and there is nothing to return back to the caller in queue.c. Drop all return values and make the function return void. Signed-off-by: Linus Walleij --- drivers/mmc/core/block.c | 38 ++++++++++++++------------------------ drivers/mmc/core/block.h | 2 +- 2 files changed, 15 insertions(+), 25 deletions(-) -- 2.9.3 -- 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 f3e0c778cdbd..ede759dda395 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1149,7 +1149,7 @@ int mmc_access_rpmb(struct mmc_queue *mq) return false; } -static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) +static void mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) { struct mmc_blk_data *md = mq->blkdata; struct mmc_card *card = md->queue.card; @@ -1187,11 +1187,9 @@ static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) mmc_blk_reset_success(md, type); fail: blk_end_request(req, err, blk_rq_bytes(req)); - - return err ? 0 : 1; } -static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, +static void mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, struct request *req) { struct mmc_blk_data *md = mq->blkdata; @@ -1254,11 +1252,9 @@ static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, mmc_blk_reset_success(md, type); out: blk_end_request(req, err, blk_rq_bytes(req)); - - return err ? 0 : 1; } -static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req) +static void mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req) { struct mmc_blk_data *md = mq->blkdata; struct mmc_card *card = md->queue.card; @@ -1269,8 +1265,6 @@ static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req) ret = -EIO; blk_end_request_all(req, ret); - - return ret ? 0 : 1; } /* @@ -1622,7 +1616,7 @@ static void mmc_blk_rw_start_new(struct mmc_queue *mq, struct mmc_card *card, } } -static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) +static void mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) { struct mmc_blk_data *md = mq->blkdata; struct mmc_card *card = md->queue.card; @@ -1635,7 +1629,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) struct mmc_async_req *old_areq; if (!rqc && !mq->mqrq_prev->req) - return 0; + return; do { if (rqc) { @@ -1648,7 +1642,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) pr_err("%s: Transfer size is not 4KB sector size aligned\n", rqc->rq_disk->disk_name); mmc_blk_rw_cmd_abort(card, rqc); - return 0; + return; } mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq); @@ -1665,7 +1659,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) */ if (status == MMC_BLK_NEW_REQUEST) mq->flags |= MMC_QUEUE_NEW_REQUEST; - return 0; + return; } /* @@ -1699,7 +1693,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) __func__, blk_rq_bytes(req), brq->data.bytes_xfered); mmc_blk_rw_cmd_abort(card, req); - return 0; + return; } break; case MMC_BLK_CMD_ERR: @@ -1767,18 +1761,16 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) } } while (ret); - return 1; + return; cmd_abort: mmc_blk_rw_cmd_abort(card, req); start_new_req: mmc_blk_rw_start_new(mq, card, rqc); - - return 0; } -int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) +void mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) { int ret; struct mmc_blk_data *md = mq->blkdata; @@ -1794,7 +1786,6 @@ int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) if (req) { blk_end_request_all(req, -EIO); } - ret = 0; goto out; } @@ -1803,19 +1794,19 @@ int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) /* complete ongoing async transfer before issuing discard */ if (card->host->areq) mmc_blk_issue_rw_rq(mq, NULL); - ret = mmc_blk_issue_discard_rq(mq, req); + mmc_blk_issue_discard_rq(mq, req); } else if (req && req_op(req) == REQ_OP_SECURE_ERASE) { /* complete ongoing async transfer before issuing secure erase*/ if (card->host->areq) mmc_blk_issue_rw_rq(mq, NULL); - ret = mmc_blk_issue_secdiscard_rq(mq, req); + mmc_blk_issue_secdiscard_rq(mq, req); } else if (req && req_op(req) == REQ_OP_FLUSH) { /* complete ongoing async transfer before issuing flush */ if (card->host->areq) mmc_blk_issue_rw_rq(mq, NULL); - ret = mmc_blk_issue_flush(mq, req); + mmc_blk_issue_flush(mq, req); } else { - ret = mmc_blk_issue_rw_rq(mq, req); + mmc_blk_issue_rw_rq(mq, req); } out: @@ -1827,7 +1818,6 @@ int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) * the 'mmc_blk_issue_rq' with 'mqrq_prev->req'. */ mmc_put_card(card); - return ret; } static inline int mmc_blk_readonly(struct mmc_card *card) diff --git a/drivers/mmc/core/block.h b/drivers/mmc/core/block.h index 00b7483f2d6e..860ca7c8df86 100644 --- a/drivers/mmc/core/block.h +++ b/drivers/mmc/core/block.h @@ -4,6 +4,6 @@ struct mmc_queue; struct request; -int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req); +void mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req); #endif