Skip to content
Commit f07c0bc2 authored by Keith Busch's avatar Keith Busch Committed by Greg Kroah-Hartman
Browse files

nvme: avoid bogus CRTO values

commit 6cc834ba upstream.

Some devices are reporting controller ready mode support, but return 0
for CRTO. These devices require a much higher time to ready than that,
so they are failing to initialize after the driver starter preferring
that value over CAP.TO.

The spec requires that CAP.TO match the appropritate CRTO value, or be
set to 0xff if CRTO is larger than that. This means that CAP.TO can be
used to validate if CRTO is reliable, and provides an appropriate
fallback for setting the timeout value if not. Use whichever is larger.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217863


Reported-by: default avatarCláudio Sampaio <patola@gmail.com>
Reported-by: default avatarFelix Yan <felixonmars@archlinux.org>
Tested-by: default avatarFelix Yan <felixonmars@archlinux.org>
Based-on-a-patch-by: default avatarFelix Yan <felixonmars@archlinux.org>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a1d1365
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment