]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: add sysfs and ioctl controller reset
authorKeith Busch <keith.busch@intel.com>
Fri, 5 Jun 2015 16:30:08 +0000 (10:30 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 5 Jun 2015 16:30:08 +0000 (10:30 -0600)
commitd060ab417e5bb7e80f15b89c12c5db4109666c6b
treedc984fc9b1a477b77f072271a9630b35b7dbdd58
parentd7af779a89a71e77200b70cdbf9a6491747e3ebb
NVMe: add sysfs and ioctl controller reset

We need the ability to perform an nvme controller reset as discussed on
the mailing list thread:

  http://lists.infradead.org/pipermail/linux-nvme/2015-March/001585.html

This adds a sysfs entry that when written to will reset perform an NVMe
controller reset if the controller was successfully initialized in the
first place.

This also adds locking around resetting the device in the async probe
method so the driver can't schedule two resets.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Cc: Brandon Schultz <brandon.schulz@hgst.com>
Cc: David Sariel <david.sariel@pmcs.com>
Updated by Jens to:

1) Merge this with the ioctl reset patch from David Sariel. The ioctl
   path now shares the reset code from the sysfs path.

2) Don't flush work if we fail issuing the reset.

Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c
include/uapi/linux/nvme.h