From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulf Hansson Subject: Re: [PATCH V2 06/22] mmc: mmc: Add functions to enable / disable the Command Queue Date: Mon, 10 Apr 2017 15:02:55 +0200 Message-ID: References: <1489408613-26915-1-git-send-email-adrian.hunter@intel.com> <1489408613-26915-7-git-send-email-adrian.hunter@intel.com> <31e5cbc2-91e0-9d32-003c-df6ea0a10a49@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-ua0-f174.google.com ([209.85.217.174]:36251 "EHLO mail-ua0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753243AbdDJNC5 (ORCPT ); Mon, 10 Apr 2017 09:02:57 -0400 Received: by mail-ua0-f174.google.com with SMTP id a1so31854879uaf.3 for ; Mon, 10 Apr 2017 06:02:56 -0700 (PDT) In-Reply-To: <31e5cbc2-91e0-9d32-003c-df6ea0a10a49@intel.com> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Adrian Hunter Cc: linux-mmc , Alex Lemberg , Mateusz Nowak , Yuliy Izrailov , Jaehoon Chung , Dong Aisheng , Das Asutosh , Zhangfei Gao , Dorfman Konstantin , David Griego , Sahitya Tummala , Harjani Ritesh , Venu Byravarasu , Linus Walleij , Shawn Lin On 10 April 2017 at 13:11, Adrian Hunter wrote: > On 10/04/17 14:01, Ulf Hansson wrote: >> On 13 March 2017 at 13:36, Adrian Hunter wrote: >>> Add helper functions to enable or disable the Command Queue. >>> >>> Signed-off-by: Adrian Hunter >>> --- >>> Documentation/mmc/mmc-dev-attrs.txt | 1 + >>> drivers/mmc/core/mmc.c | 2 ++ >>> drivers/mmc/core/mmc_ops.c | 28 ++++++++++++++++++++++++++++ >>> drivers/mmc/core/mmc_ops.h | 2 ++ >>> include/linux/mmc/card.h | 1 + >>> 5 files changed, 34 insertions(+) >>> >>> diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt >>> index 404a0e9e92b0..dcd1252877fb 100644 >>> --- a/Documentation/mmc/mmc-dev-attrs.txt >>> +++ b/Documentation/mmc/mmc-dev-attrs.txt >>> @@ -30,6 +30,7 @@ All attributes are read-only. >>> rel_sectors Reliable write sector count >>> ocr Operation Conditions Register >>> dsr Driver Stage Register >>> + cmdq_en Command Queue enabled: 1 => enabled, 0 => not enabled >>> >>> Note on Erase Size and Preferred Erase Size: >>> >>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c >>> index 7fd722868875..5727a0842a59 100644 >>> --- a/drivers/mmc/core/mmc.c >>> +++ b/drivers/mmc/core/mmc.c >>> @@ -790,6 +790,7 @@ static int mmc_compare_ext_csds(struct mmc_card *card, unsigned bus_width) >>> MMC_DEV_ATTR(raw_rpmb_size_mult, "%#x\n", card->ext_csd.raw_rpmb_size_mult); >>> MMC_DEV_ATTR(rel_sectors, "%#x\n", card->ext_csd.rel_sectors); >>> MMC_DEV_ATTR(ocr, "%08x\n", card->ocr); >>> +MMC_DEV_ATTR(cmdq_en, "%d\n", card->ext_csd.cmdq_en); >> >> Why do we need to be able to change this from userspace? > > MMC_DEV_ATTR makes it read-only, so it is just a way for userspace to see if > command queue is enabled. Of course! Thanks for the clarification - and yes, that makes sense! Kind regards Uffe