[PATCH] nvme-pci: ignore bogus CRTO according to NVME 2.0 spec

Felix Yan felixonmars at archlinux.org
Fri Sep 8 10:03:08 PDT 2023


On 9/8/23 19:51, Keith Busch wrote:
> On Fri, Sep 08, 2023 at 06:54:42PM +0300, Felix Yan wrote:
>> NVME 2.0 spec section 3.1.3 suggests that "Software should not rely on
>> 0h being returned". Here we should safeguard timeout reads when CRTO is 0 and
>> fallback to the old NVME 1.4 compatible field.
> 
> Not sure I follow what you're saying here. We're not really relying on
> CRTO being 0. It was a non-zero capability bit that told the driver to
> use CRTO, and 0 is potentially a valid value a controller could report.

Sorry, I actually meant the opposite: If the whole CRTO field is zeroed, 
we probably shouldn't rely on it as per the spec says.

I understand that 0 could be a valid value, the spec _may_ be a little 
bit unclear here then, if I understand it correctly.

-- 
Regards,
Felix Yan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20230908/1ce7541c/attachment-0001.sig>


More information about the Linux-nvme mailing list