NVMe: Device resume error handling
authorKeith Busch <keith.busch@intel.com>
Tue, 10 Dec 2013 20:10:36 +0000 (13:10 -0700)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Mon, 16 Dec 2013 20:54:39 +0000 (15:54 -0500)
commit9a6b94584de1a0467d85b435df9c744c5c45a270
treeeab218e65ce9e224b48b4d721819f871d909efe1
parent68608c268bf265b039daeaafee6c902dfef32024
NVMe: Device resume error handling

Adds controller error handling on resume power management. If the device
fails to initialize, the device is queued for a reset. If the reset fails,
a thread is spawned to remove the pci device.

If the device resumes as "busy", the device is responding to admin
commands but will not create IO queues. In this case, we need to remove
the gendisks and free the IO queues since they can't be used and may be
holding bios in their lists.

From testing, the dma pools require a pci device so this had to change
the pci driver 'remove' to release the dma resources in line with that
call instead of after all references to the device are released.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme-core.c
include/linux/nvme.h