]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: fix timeout request state check
authorKeith Busch <kbusch@kernel.org>
Wed, 18 Jan 2023 16:44:16 +0000 (08:44 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:25 +0000 (08:34 +0100)
commitedda48a67394f1a951ee671248e8546c356da40a
tree102d1724ca134cb992aa7aa313085635a1c9168d
parent9516aa83f11aef3242aaf7e672c5675f80988b17
nvme-pci: fix timeout request state check

[ Upstream commit 19133987dd17a8dafbc4ad085318b9d1d30b26da ]

Polling the completion can progress the request state to IDLE, either
inline with the completion, or through softirq. Either way, the state
may not be COMPLETED, so don't check for that. We only care if the state
isn't IN_FLIGHT.

This is fixing an issue where the driver aborts an IO that we just
completed. Seeing the "aborting" message instead of "polled" is very
misleading as to where the timeout problem resides.

Fixes: 7877214445d98e ("nvme-pci: Remove tag from process cq")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/pci.c