Re: [PATCH V5 03/13] mmc: host: Add CQE interface

Ulf Hansson
2017-08-22T11:13:16Z

On 10 August 2017 at 14:08, Adrian Hunter <adrian.hunter@intel.com> wrote:
> Add CQE host operations, capabilities, and host members.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>

Thanks, applied for next! However with some minor comments, explained below.

[...]

>
> + /* Command Queue Engine (CQE) support */
> + const struct mmc_cqe_ops *cqe_ops;
> + void *cqe_private;
> + /*
> + * Notify uppers layers (e.g. mmc block driver) that CQE needs recovery
> + * due to an error associated with the mmc_request.
> + */

Thanks for adding the explanation.

> + void (*cqe_recovery_notifier)(struct mmc_host *,
> + struct mmc_request *);

Normally we don't put callbacks in the struct mmc_host that someone
else than the host driver should assign - so this feels a bit upside
down.

Is there any reason to why you didn't want to add a new API? Something
like mmc_cqe_recover(), which the host driver could call.

> + int cqe_qdepth;
> + bool cqe_enabled;
> + bool cqe_on;
> +
> unsigned long private[0] ____cacheline_aligned;
> };
>
> --
> 1.9.1
>

Kind regards
Uffe