From patchwork Fri Sep 6 03:52:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 173192 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp180107ilq; Thu, 5 Sep 2019 20:53:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1u23spAikMxuR7pBnvdxuSHaVOuOgq6xEYxCPe68vaKB7iEaH0V4c6IOa4imQN271YeUc X-Received: by 2002:a65:610a:: with SMTP id z10mr6281686pgu.178.1567741981965; Thu, 05 Sep 2019 20:53:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567741981; cv=none; d=google.com; s=arc-20160816; b=tDt8rzXqyASUPz9nCLBCEEzZXjhf+uuJTZIJA6IDBbhXRb5o0kwaAaUzNXkyZqwnej v3EPJT5PqumYA6+6ozXt6vACx+DntbZTq/b/M1FbNT/A5oigjaxCjVzXVmX0Mnd6+R0Z KU7Z5+58cOHvD+YxwCOaFhoGbr3NXAlx0pgdokD8S0If1mMV4KvDwJr93hvq3wAhczJK J3lVp14BsOYNAH9MVigg0t3iXER0g/edMs8RCZXK+X4uW7tTkt+dF83NJgHFntXai4JH nBCX8HPBva3jqE4+++iiZpjxp0FpXe1/URk8KjXGN1PVADxTCZZaBvOJvrdzhjw1JqxH V6aA== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=+Qa6FN4bybUWpL4Kw6U5VKtqicdkV7LDgiUgYM+LUYg=; b=jzRYha2b3yvGZNAzdSU9VIrEI7/AAKFZwMQJLxqFF+jEt52F7DLxAcFSMHnsjf2Ya4 buK2LpCPMFcSwfNQJtXJUWoGnTsuzKu7koaE8kS/dFTwD7WrBMk+Ow/izw7ZKU4AB4CW ztdzEQwQoXe2ySJUIIqioUhpleGSBEqDR14OxkCuB2ePgWnOljO20wRMjMz6G9tvQJl/ wHF0DOquM//o1zYCpOxvKvynsE3obXH061ZFfS4EIxrassCdUNyLADGXI9tKJ4J6yMc4 yz65XXA+U9vBkJpl57jdCP8eRuUNcAfliU9DJPQgf+SERLxJHC7W6Tld58rL6t2EmEbq vsFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uxSBN916; 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=pass (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 k190si3359438pge.308.2019.09.05.20.53.01; Thu, 05 Sep 2019 20:53:01 -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=pass header.i=@linaro.org header.s=google header.b=uxSBN916; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404473AbfIFDw7 (ORCPT + 5 others); Thu, 5 Sep 2019 23:52:59 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42827 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404469AbfIFDw6 (ORCPT ); Thu, 5 Sep 2019 23:52:58 -0400 Received: by mail-pg1-f196.google.com with SMTP id p3so2671128pgb.9 for ; Thu, 05 Sep 2019 20:52:58 -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 :in-reply-to:references; bh=+Qa6FN4bybUWpL4Kw6U5VKtqicdkV7LDgiUgYM+LUYg=; b=uxSBN916hJwbA+vDDyLagwrLfwSaXLXvaXvT7/GTQRAnzOsCH+WDXs7QncMqgzLmyF y27gY2CoyiyQUPwpQGgqGY7xxPWrlVRjXUHMiTVZIVaFCFgroupu/GPS5I9tho3uYkVu YZnGJ1zDf3f2JB4R8y5x3qpb5Ych0HA5/0wGnDtMqlHI2Zi/It8lL+pKtNubEnu5BMId NDZh9X9bJctDYxCIRQIFR9QDuLO+3outSSYq4rk0LROg2ALEJ/zbABXB6DRIxE2S07tx Z2Bntybcl/W7gKM4knG+5bCVyOZ8yt4pODOwEfBvb9y0MB+8LqFcucZ3iK1w+Vzhknt7 v/vw== 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:in-reply-to:references; bh=+Qa6FN4bybUWpL4Kw6U5VKtqicdkV7LDgiUgYM+LUYg=; b=VnHX8VtSLMh5rgyrRTpymnT7rwjt7NpnrlVB29w7jgq/mFAYDABOvebPZ/bsoMP9uU oEsEKxk9+FvFqZbRxL7BVS+qo0eDVZwRRj91lns4hPGa86mJKsL/Wv6U7NvTj3VW14H3 seMyNx7Lk+AryyfQq9cwVPjQsO6pzSwhL98pf5ULzOUON4xwyAzeDxqB7egPYst+MKcg u/EURqRe0r60b9Z0makcXBbEqD+7JJcyLc8tMe36WXVJVdOeytQzTU7j6Hqg8Db5Y2gq Y/6Nbagh+LMvkfZrzGeA/q+qh7acHyMXkUKr7JhO+qpCtKap0/3WY+XeTF1rTl/DTv18 3QUQ== X-Gm-Message-State: APjAAAWthpS7qKu+4rJJ2vdHBYYBMpFzmEEkK8+rRuySJpXoag3D6U8J EDmoun/y33K2ipe5hGNk4CB+1w== X-Received: by 2002:a63:4522:: with SMTP id s34mr6154076pga.362.1567741977816; Thu, 05 Sep 2019 20:52:57 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id j7sm4205770pfi.96.2019.09.05.20.52.53 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Sep 2019 20:52:57 -0700 (PDT) From: Baolin Wang To: adrian.hunter@intel.com, ulf.hansson@linaro.org, riteshh@codeaurora.org, asutoshd@codeaurora.org Cc: orsonzhai@gmail.com, zhang.lyra@gmail.com, arnd@arndb.de, linus.walleij@linaro.org, vincent.guittot@linaro.org, baolin.wang@linaro.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] mmc: host: sdhci: Add virtual command queue support Date: Fri, 6 Sep 2019 11:52:02 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add cqhci_virt_finalize_request() to help to complete a request from virtual command queue. Signed-off-by: Baolin Wang --- drivers/mmc/host/sdhci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 1.7.9.5 diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 4e9ebc8..fb5983e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -32,6 +32,7 @@ #include #include "sdhci.h" +#include "cqhci.h" #define DRIVER_NAME "sdhci" @@ -2710,7 +2711,8 @@ static bool sdhci_request_done(struct sdhci_host *host) spin_unlock_irqrestore(&host->lock, flags); - mmc_request_done(host->mmc, mrq); + if (!cqhci_virt_finalize_request(host->mmc, mrq)) + mmc_request_done(host->mmc, mrq); return false; } @@ -3133,7 +3135,8 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) /* Process mrqs ready for immediate completion */ for (i = 0; i < SDHCI_MAX_MRQS; i++) { - if (mrqs_done[i]) + if (mrqs_done[i] && + !cqhci_virt_finalize_request(host->mmc, mrqs_done[i])) mmc_request_done(host->mmc, mrqs_done[i]); }