]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nvme: merge probe_work and reset_work
authorChristoph Hellwig <hch@lst.de>
Thu, 26 Nov 2015 11:42:26 +0000 (12:42 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:40:46 +0000 (13:40 -0700)
commitfd9ab27f96ac5dfbe6467cc33cd407ea5143bf99
tree3ef5301e76229d1c26a95169e9bec087ed21f242
parentbe6c16ceaa10f8658535382bff1b8320f6866009
nvme: merge probe_work and reset_work

If we're using two work queues we're always going to run into races where
one item is tearing down what the other one is initializing.  So insted
merge the two work queues, and let the old probe_work also tear the
controller down first if it was alive.  Together with the better detection
of the probe path using a flag this gives us a properly serialized
reset/probe path that also doesn't accidentally trigger when two commands
time out and the second one tries to reset the controller while the first
reset is still in progress.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit fd634f4142861e533ac57e88ece8e98ab5851edb)

Orabug: 25130845

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/pci.c