Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5626518ybv; Tue, 11 Feb 2020 20:14:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwmGC0AW29cCbvmjMyDpL1CrlFAyjPgFAdl4PDw413z31IOtY9+38Tjpv086cvcYrzRRxcE X-Received: by 2002:a9d:69ce:: with SMTP id v14mr8016243oto.248.1581480877007; Tue, 11 Feb 2020 20:14:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581480877; cv=none; d=google.com; s=arc-20160816; b=sS7nBnE2PwcgTYmoretZYoICrpY9guYGcA4bbNcRupBn8rDX/gYzSGW78pB2C4K6BP ZOoA5u48AW0HP+z9aMOb+inecQp4sLOKbTjBb8Z7pX+F5yTMT5aay0N4woQ2p0zO5rsW cyQkteKXTGR6JNWwVR8JECS/W1xq4X8O/0Wt6Bt+lS1dTsS5fc6u+LOdIctwLOvHoAGH OLSVnKTHpnmkqbWprlQGMSRj1e44TZW7ziv8GjpnuDw9amWHJJEtjqT+jspkcVONXT2v 7bTvW/eheRAvPfgKyoKR41UXnqcFCIzEB/iVtIrCQhG4CwWwd1Xru6znV4901PxODVv3 BH1w== 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=341fIr27AyNPBcsww4i3en3R4df0bv31VLkS1AGBqK0=; b=Jv/ML28pEq5QjBLJJ3mToT4CkA8/p0TwSSMUaIFkZ5cDA4ihHImzeAlkvBoneiP9z7 9g7qB28J0MN8YBZAxI0GWOv/iexaY0AC7LseTGadJ75otLKAubya02fADG1L9OPU8XGa PSeIfAPWz8oTkMtnArRDxDqk+9t6hni9MmLIbJTBI1oW/g5NO8Jqb6FaA9lVIhYjL4dr favj3EicR2RpR8Jmw3Yz+nYNtDiEkefR4ZRBl08AT74VajAg8GX06jSlggRcf/eqgikQ bB3FEUHbz2EMm937DW75oDZDNwp/I46RdEIaky7GaYAX9znCT7ak6x8lixnTy1G1W0Dw Lm6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="e/MKSaug"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si2758418oiw.133.2020.02.11.20.14.25; Tue, 11 Feb 2020 20:14:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@gmail.com header.s=20161025 header.b="e/MKSaug"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728000AbgBLEOK (ORCPT + 99 others); Tue, 11 Feb 2020 23:14:10 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:40510 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727602AbgBLEOK (ORCPT ); Tue, 11 Feb 2020 23:14:10 -0500 Received: by mail-pg1-f194.google.com with SMTP id z7so498064pgk.7; Tue, 11 Feb 2020 20:14:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=341fIr27AyNPBcsww4i3en3R4df0bv31VLkS1AGBqK0=; b=e/MKSaugs0NVZ5zlKgcrjRIFDkFKH1MjbOdhMjZXao0ijbBhSU+TRLzKOGcqJEH4kw bOW9HADRj7zS069n4EL9GFEQ7Cju5gLZQU9ItS1jjQ0bPxAGby6FxjRtndkja5rrDqVN y8+hJF8YcOtIpcT04MtsJb+FEBv3Nyn8iFcc2GouBWuy68Bjl+c7wvWJDr9p3kaxP+I+ p+pJnXJp5K+zPw6GVo/jbkFapBQYUWLXZHnC+SFtE/JEnOWEYxT9UP1IoTxXQ1pohvDP 1Oc3J3oklEnn4BraoA5kRVMN1l1xqO/gb+xqppmBVzru2HjTkPWiiHcd3RPQSp0wrNag P41Q== 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=341fIr27AyNPBcsww4i3en3R4df0bv31VLkS1AGBqK0=; b=nzku3OQtDwLde36SfYmHczubkj6S/d7Hjj5k1E6xlBoixE+pB/PRVs4hylbfG+8xJJ drODWG8VDYmFn9CJEcVfijK9R7ldOXwtROEPV2rFAFu7IAiKeVEMzz12TtfPe04ubmr5 +Ir0g8OefuHOqs7y9xQHbNWDABGlFaGKJnBfEdRHyq87mZa/MKoQFvk/5KgkhVzSnli1 H5lH+L27zMslLhRpMa3tKOvgKKBrW1ybcp3Q6sdXziUX26HTZXE7oJzGPF56lHQTfOM6 iuCR6qpQijaAd8nXx6/NKiiycpzIoA0tcnL9fPlT1SYr94iNp8XQFrDG0B3BC6++ZaKV N1bQ== X-Gm-Message-State: APjAAAXtDBOQTKgumiF5Z/4Ny6dp8SYoUhTfeNS/bOuHJskri/98kVKW JDVFCYxV58ujKTuOow511rY= X-Received: by 2002:aa7:8755:: with SMTP id g21mr9774050pfo.36.1581480849589; Tue, 11 Feb 2020 20:14:09 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id q66sm6424762pfq.27.2020.02.11.20.14.06 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Feb 2020 20:14:09 -0800 (PST) From: Baolin Wang To: adrian.hunter@intel.com, ulf.hansson@linaro.org, asutoshd@codeaurora.org Cc: orsonzhai@gmail.com, zhang.lyra@gmail.com, arnd@arndb.de, linus.walleij@linaro.org, baolin.wang@linaro.org, baolin.wang7@gmail.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v9 2/5] mmc: core: Enable the MMC host software queue for the SD card Date: Wed, 12 Feb 2020 12:12:57 +0800 Message-Id: <0065b4631fef2d61c3b89d14a4ea4f2b7499ea56.1581478568.git.baolin.wang7@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Baolin Wang Enable the MMC host software queue for the SD card if the host controller supports the MMC host software queue. On my Spreadtrum platform, I did not see any obvious performance changes in 4K block size when changing to use hsq for the SD cards, I think the reason is the SD card works at a low speed on my platform, and most of time is spent in the hardware. But we can see some obvious improvements when enabling the packed request based on hsq, that's why we still add hsq support for the SD cards. Signed-off-by: Baolin Wang Signed-off-by: Baolin Wang --- drivers/mmc/core/sd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index fe914ff..76c7add 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -1082,6 +1082,16 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, } } + if (host->cqe_ops && !host->cqe_enabled) { + err = host->cqe_ops->cqe_enable(host, card); + if (!err) { + host->cqe_enabled = true; + host->hsq_enabled = true; + pr_info("%s: Host Software Queue enabled\n", + mmc_hostname(host)); + } + } + if (host->caps2 & MMC_CAP2_AVOID_3_3V && host->ios.signal_voltage == MMC_SIGNAL_VOLTAGE_330) { pr_err("%s: Host failed to negotiate down from 3.3V\n", -- 1.7.9.5