]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: fix nvme reset command timeout handling
authorKeith Busch <keith.busch@intel.com>
Thu, 10 Aug 2017 09:23:31 +0000 (11:23 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 10 Aug 2017 17:53:38 +0000 (19:53 +0200)
commit634b8325905031eeafa61951623681ebc1329385
treec82f4ec33d826a88182e7aa62cf51b3b438b0d9a
parent1c78f7735b2bdd0afbe5d14c5c8b6d8d381b6f13
nvme: fix nvme reset command timeout handling

We need to return an error if a timeout occurs on any NVMe command during
initialization. Without this, the nvme reset work will be stuck. A timeout
will have a negative error code, meaning we need to stop initializing
the controller. All postitive returns mean the controller is still usable.

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

Signed-off-by: Keith Busch <keith.busch@intel.com>
Cc: Martin Peres <martin.peres@intel.com>
[jth consolidated cleanup path ]
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c