[PATCH 1/1] nvme: check for Identify CNS 06h opcode support

Keith Busch kbusch at kernel.org
Thu Sep 30 09:04:32 PDT 2021


On Thu, Sep 30, 2021 at 12:14:26PM +0000, Aviv Heller wrote:
> nvme_init_non_mdts_limits() issues Identify CNS 06h command, and
> silently fails in case of command failure.
> 
> The code checks whether CNS values greater than 1 are supported,
> however, CNS 06h is only supported since 2.0.
> 
> Modify the check such that the command is only issued for 2.0
> compliant devices.
>
> Fixes: 5befc7c26e5a ("nvme: implement non-mdts command limits")

There's no requirement that a controller report a particular version in
order to implement a TP, though. It's perfectly valid for a controller
that reports version 1.4 may implement this feature. We just don't have
a way to konw if a controller implements this CNS (TPAR 4135 aims to fix
that), so we just try it and look for success.

The driver doesn't care if the controller doesn't support this
identification. If the controller doesn't support it, we should get an
Invalid Field status. The driver will carry on as before, so it should
be harmless. What problem is this actually fixing?



More information about the Linux-nvme mailing list