All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	linux-block <linux-block@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Bough Chen <haibo.chen@nxp.com>,
	Alex Lemberg <alex.lemberg@sandisk.com>,
	Mateusz Nowak <mateusz.nowak@intel.com>,
	Yuliy Izrailov <Yuliy.Izrailov@sandisk.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Dong Aisheng <dongas86@gmail.com>,
	Das Asutosh <asutoshd@codeaurora.org>,
	Zhangfei Gao <zhangfei.gao@gmail.com>,
	Sahitya Tummala <stummala@codeaurora.org>,
	Harjani Ritesh <riteshh@codeaurora.org>,
	Venu Byravarasu <vbyravarasu@nvidia.com>,
	Shawn Lin <shawn.lin@rock-chips.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH V13 05/10] mmc: cqhci: support for command queue enabled host
Date: Thu, 9 Nov 2017 13:26:05 +0100	[thread overview]
Message-ID: <CACRpkdZ2Xr9xKg-FD1QB_Kq=E6TpBDg-3giamAVbuykAxi=9vw@mail.gmail.com> (raw)
In-Reply-To: <a9eb7e73-31b4-6ff6-4a0d-1416c938039b@intel.com>

On Wed, Nov 8, 2017 at 3:14 PM, Adrian Hunter <adrian.hunter@intel.com> wrote:
> On 08/11/17 11:22, Linus Walleij wrote:
>> On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter <adrian.hunter@intel.com> wrote:

>> (...)

>>> +EXPORT_SYMBOL(cqhci_resume);
>>
>> Why would the CQE case require special suspend/resume
>> functionality?
>
> Seems like a very strange question.

Please realize that patch review is partly about education.

Educating me or anyone about your patch set involves
being humbe and not seeing your peers as lesser.

Making your reviewer feel stupid by saying the ask
"strange" or outright stupid questions is not helping
your cause.

> Obviously CQHCI has to be configured
> after suspend.

Yeah. I think I misunderstood is such that:

> Also please don't confuse CQE and CQHCI.  CQHCI is an implementation of a
> CQE.  We currently do not expect to have another implementation, but it is
> not impossible.

OK now you educated me, see it's not that hard without
using belitteling language.

>> This seems two much like on the side CQE-silo engineering,
>> just use the device .[runtime]_suspend/resume callbacks like
>> everyone else, make it possible for the host to figure out
>> if it is in CQE mode or not (I guess it should know already
>> since cqhci .enable() has been called?) and handle it
>> from there.
>
> That is how it works!  The host controller has to decide how to handle
> suspend / resume.

OK.

> cqhci_suspend() / cqhci_resume() are helper functions that the host
> controller can use, but doesn't have to.

OK.

>> Why would CQE hosts need special accessors and the rest
>> of the host not need it?
>
> Special accessors can be used to fix up registers that don't work exactly
> the way the standard specified.

Yeah this is fine as it is for CQHCI, I didn't get that
part :)

>> ->enable and ->disable() for just CQE seem reasonable.
>> But that leaves just two new ops.
>>
>> So why not just put .cqe_enable() and .cqe_disable()
>> ops into mmc_host_ops as optional and be done with it?
>
> Ok so you are not understanding this at all.

No I did not get it. But I do now (I think).

> As a CQE implementation, CQHCI interfaces with the upper layers through the
> CQE ops etc.
>
> But CQHCI also has to work with any host controller driver, so it needs an
> interface for that, which is what cqhci_host_ops is for.  All the ops serve
> useful purposes.
(...)
> The whole point is to prove a library that can work with any host controller
> driver.  That means it must provide functions and callbacks.

OK

>> I think the above approach to put any CQE-specific callbacks
>> directly into the struct mmc_host_ops is way more viable.
>
> Nothing to do with CQE.  This is CQHCI.  Please try to get the difference.

I am trying, please try to think about your language.

>> If special CQE init is needed, why a special cqhci_init()
>> call? And cqhci_pltfm_init()? It's confusing. Can't
>> you just call this by default from the core if the host is
>> CQE capable? Ass a .cqhci_init() callback into mmc_host_ops
>> if need be.
>
> Yeah, so CQHCI is just one of theoretically any number of CQE
> implementations.  This has nothing to do with the core.  It is entirely up
> to the host driver.  cqhci_pltfm_init() allows the mmio space to be defined
> by platform resources, whereas cqhci_init() does all the rest of the
> initialization.

It's fair.

Yours,
Linus Walleij

  reply	other threads:[~2017-11-09 12:26 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 13:20 [PATCH V13 00/10] mmc: Add Command Queue support Adrian Hunter
2017-11-03 13:20 ` [PATCH V13 01/10] mmc: core: Add parameter use_blk_mq Adrian Hunter
2017-11-06  8:38   ` Linus Walleij
2017-11-03 13:20 ` [PATCH V13 02/10] mmc: block: Add error-handling comments Adrian Hunter
2017-11-06  8:39   ` Linus Walleij
2017-11-03 13:20 ` [PATCH V13 03/10] mmc: block: Add blk-mq support Adrian Hunter
2017-11-08  8:54   ` Linus Walleij
2017-11-09 10:42     ` Adrian Hunter
2017-11-09 15:52       ` Linus Walleij
2017-11-10 10:19         ` Linus Walleij
2017-11-14 13:10         ` Adrian Hunter
2017-11-14 13:10           ` Adrian Hunter
2017-11-14 14:50           ` Linus Walleij
2017-11-15 10:55             ` Ulf Hansson
2017-11-15 13:07               ` Adrian Hunter
2017-11-16  7:19                 ` Ulf Hansson
2017-11-03 13:20 ` [PATCH V13 04/10] mmc: block: Add CQE support Adrian Hunter
2017-11-08  9:00   ` Linus Walleij
2017-11-08 13:20     ` Adrian Hunter
2017-11-09 12:04       ` Linus Walleij
2017-11-09 12:39         ` Adrian Hunter
2017-11-03 13:20 ` [PATCH V13 05/10] mmc: cqhci: support for command queue enabled host Adrian Hunter
2017-11-08  9:22   ` Linus Walleij
2017-11-08 14:14     ` Adrian Hunter
2017-11-09 12:26       ` Linus Walleij [this message]
2017-11-09 12:55         ` Adrian Hunter
2017-11-10  8:29           ` Linus Walleij
2017-11-09 13:41   ` Ulf Hansson
2017-11-09 14:20     ` Adrian Hunter
2017-11-03 13:20 ` [PATCH V13 06/10] mmc: sdhci-pci: Add CQHCI support for Intel GLK Adrian Hunter
2017-11-08  9:24   ` Linus Walleij
2017-11-09  7:12     ` Adrian Hunter
2017-11-10  8:18       ` Linus Walleij
2017-11-09 13:37   ` Ulf Hansson
2017-11-03 13:20 ` [PATCH V13 07/10] mmc: block: blk-mq: Add support for direct completion Adrian Hunter
2017-11-08  9:28   ` Linus Walleij
2017-11-09  7:27     ` Adrian Hunter
2017-11-09 12:34       ` Linus Walleij
2017-11-09 15:33         ` Adrian Hunter
2017-11-09 13:07   ` Ulf Hansson
2017-11-09 13:15     ` Adrian Hunter
2017-11-03 13:20 ` [PATCH V13 08/10] mmc: block: blk-mq: Separate card polling from recovery Adrian Hunter
2017-11-08  9:30   ` Linus Walleij
2017-11-09  7:56     ` Adrian Hunter
2017-11-09 12:52       ` Linus Walleij
2017-11-09 13:02         ` Adrian Hunter
2017-11-10  8:25           ` Linus Walleij
2017-11-03 13:20 ` [PATCH V13 09/10] mmc: block: blk-mq: Stop using card_busy_detect() Adrian Hunter
2017-11-09 13:36   ` Ulf Hansson
2017-11-09 15:24     ` Adrian Hunter
2017-11-03 13:20 ` [PATCH V13 10/10] mmc: block: blk-mq: Stop using legacy recovery Adrian Hunter
2017-11-08  9:38   ` Linus Walleij
2017-11-09  7:43     ` Adrian Hunter
2017-11-09 12:45       ` Linus Walleij
     [not found] ` <CGME20171116094642epcas1p14018cb1c475efa38942109dc24cd6da9@epcas1p1.samsung.com>
2017-11-16  9:46   ` [PATCH V13 00/10] mmc: Add Command Queue support Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACRpkdZ2Xr9xKg-FD1QB_Kq=E6TpBDg-3giamAVbuykAxi=9vw@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=Yuliy.Izrailov@sandisk.com \
    --cc=adrian.hunter@intel.com \
    --cc=alex.lemberg@sandisk.com \
    --cc=asutoshd@codeaurora.org \
    --cc=dongas86@gmail.com \
    --cc=haibo.chen@nxp.com \
    --cc=hch@lst.de \
    --cc=jh80.chung@samsung.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mateusz.nowak@intel.com \
    --cc=riteshh@codeaurora.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=stummala@codeaurora.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vbyravarasu@nvidia.com \
    --cc=zhangfei.gao@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.