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

From: Felix Yan
Date: Fri Sep 08 2023 - 13:03:22 EST


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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature