[PATCHv3 1/5] nvme: Centralize AEN defines

Christoph Hellwig hch at lst.de
Thu Nov 9 01:23:38 PST 2017


Looks fine:

Reviewed-by: Christoph Hellwig <hch at lst.de>

> diff --git a/include/linux/nvme.h b/include/linux/nvme.h
> index fd1d4508a612..89ffa7eed2fd 100644
> --- a/include/linux/nvme.h
> +++ b/include/linux/nvme.h
> @@ -90,6 +90,14 @@ enum {
>  };
>  
>  #define NVME_AQ_DEPTH		32
> +#define NVME_NR_AEN_COMMANDS	1
> +#define NVME_AQ_BLK_MQ_DEPTH	(NVME_AQ_DEPTH - NVME_NR_AEN_COMMANDS)
> +
> +/*
> + * Subtract one to leave an empty queue entry for 'Full Queue' condition. See
> + * NVM-Express 1.2 specification, section 4.1.2.
> + */
> +#define NVME_AQ_MQ_TAG_DEPTH	(NVME_AQ_BLK_MQ_DEPTH - 1)

But none of these (including NVME_AQ_DEPTH) really is a protocol
constant, so this should probably move to drivers/nvme/host/nvme.h.

No need to do that in this patchseries, though.



More information about the Linux-nvme mailing list