Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp242449ybv; Wed, 5 Feb 2020 04:52:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxhedA9A/SN84JkE13NocuH5XNtpP2Z0UtkvGQ4mEmSkxbonGSjCQo04QBnPUK4x/5Ut7ZC X-Received: by 2002:a05:6830:1353:: with SMTP id r19mr26383892otq.288.1580907165429; Wed, 05 Feb 2020 04:52:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580907165; cv=none; d=google.com; s=arc-20160816; b=nIazSNANGFsl69WWnPY+9ymTCTwjIB/i7JDIC0R8UcWqndG5kLwoN1/j/wpBJNhxPA cjNOdzuso+PQZBBFJbLGOjKAmORYYFse8GOXz5vJ4Vx9PbluJ1lNJ9SHIoYonkbUM0Vn fvfH+344FmZ5VUqyqDC4EpcJKxGbeD4Ul9xbjhMcrFOZrNQoJtCG/roQD5dU7m2Z9fbj fBjuN/6KApWpK8s1Fchx8GNACpV0dlpY3n8O0xZt/zUBQ0j3wqjg1Y76BLjINEV3YM4L /CoMZSsrG4dvSdjx4d781Q+sOFDuQqlWLV194E4Jii4+vPu+cfaGdhC62FmL7UgRmUPs rSsg== 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=p4o6nUOGxNPuRPSrNBregTBA8bwmvTg5CUl0u2z528Q=; b=wDBJfyznu6VKeWB2pfpMYbFr1wbKiQjM0z1vz0UPIqA0uMoSCU3/Fgmm/Pgq0ZMtbY kPB7m/iK2FNai9/hVfvWOhSEoR9LbUGDyfM++EvChYQugoXgQJMSg2uPdNiuMUB/oquh x791OyjlQg0nrHs1KVVshSbkFZ8JJgeB3Bc3lrr5xFazLznEs21bN95fyg+tKeeFoBWv 2iZOfPCUP/DNvGphLlHQDpmMN/YBnyWjwYI5A4H2KqB9EAu8GcXSPEvFO7VXCO2luqHj eY3OSTg2izQqvP5V3tu/5sYgqMgJsxJyYMCgZwSAwpmhsBXn34YWky2YkJ1bFfPrvMNt uTOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fbNGETkV; 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 m9si11889632oie.148.2020.02.05.04.52.24; Wed, 05 Feb 2020 04:52:45 -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=fbNGETkV; 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 S1728056AbgBEMv0 (ORCPT + 99 others); Wed, 5 Feb 2020 07:51:26 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:50859 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726960AbgBEMvZ (ORCPT ); Wed, 5 Feb 2020 07:51:25 -0500 Received: by mail-pj1-f65.google.com with SMTP id r67so954234pjb.0; Wed, 05 Feb 2020 04:51:24 -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=p4o6nUOGxNPuRPSrNBregTBA8bwmvTg5CUl0u2z528Q=; b=fbNGETkV3yePdfOPkkretpz/hHkJaTfR9FtEV44umuMjmWjiSP4KwUy85KHD5vWFMM k08UG0ivgazlOCXXwx0uzSviXrifB+a1cvgQSXZpLuTQTDqR2SHs19Kx6HecK1J2Dksx oCdml0BtSgbx+B5wK5EhnXCYYfFnYNhBBwnBpLFuQYMQjBnYGiw5eESm3HJBFoazO3oq 1mVsem66t2Izi8pvp9eP8o83i1aCKEx5GJn5VTy3w1yjIpdTgYz+34eOy/5fzNSKjbVC qTm3dTiHbUyYtGn/LTfYkOItlGFeS3zq0LVexbdrwKyHzDVP9JCSzW+AmaSkvtXKKz1r vH/w== 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=p4o6nUOGxNPuRPSrNBregTBA8bwmvTg5CUl0u2z528Q=; b=GFZGkousOn9FrT0tUqIRWL5c/cq8kiWpaili6Evb72mv8/tmFndcC4h3gMuQGcADbK ebi8AnkKkMLlAMiZHmyLryxw2Ky758WBY7eF1ClCvVyP1qGUc/dH6RV2BAVm2MI5Fz4I WZ6vLKu8Nv0g3QLqNFZRiPcVuBWcBZP6fqcFB8u5jNODDIjg6fJG9IXgfmofTeiapFmB gQgdKWUyAmL/gdcM9jgPn5ftRNlbvFILpkY5QyyJUOHI6rcOtJ1e5Mo9EnK3TJIiyUIr NheXUpwrTXE+sNb1/1kIn2uA3kAHjPCTMKqi45Flw+qc2sTiasZtjQehupUim1lS0pkZ z4hw== X-Gm-Message-State: APjAAAUH7UXTkDMBriet4paA0O1WqlwWfMlCcUoEsMvd1QNzbpFjFa0e w/SnWLMfSJKSSpXYKe+od9o= X-Received: by 2002:a17:90a:9285:: with SMTP id n5mr5701197pjo.58.1580907084424; Wed, 05 Feb 2020 04:51:24 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id y127sm22864784pfg.22.2020.02.05.04.51.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Feb 2020 04:51:24 -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 v8 2/5] mmc: core: Enable the MMC host software queue for the SD card Date: Wed, 5 Feb 2020 20:50:29 +0800 Message-Id: <0dc2be36722232c07ad9bd61ca285ed1553fe3c9.1580894083.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. 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