]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
nvme: move chardev and sysfs interface to common code
authorChristoph Hellwig <hch@lst.de>
Sat, 28 Nov 2015 14:40:19 +0000 (15:40 +0100)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 29 Feb 2016 15:58:59 +0000 (08:58 -0700)
commit35ded85d01bb155ffa6a61c2119f0d65a17a2dd5
tree64934f0fb9a3c88123e15c19f2c64475c28e5a5c
parentce4008d0032d2ef71237fb1cab769ae57711efbe
nvme: move chardev and sysfs interface to common code

BugLink: http://bugs.launchpad.net/bugs/1531539
For this we need to add a proper controller init routine and a list of
all controllers that is in addition to the list of PCIe controllers,
which stays in pci.c.  Note that we remove the sysfs device when the
last reference to a controller is dropped now - the old code would have
kept it around longer, which doesn't make much sense.

This requires a new ->reset_ctrl operation to implement controleller
resets, and a new ->write_reg32 operation that is required to implement
subsystem resets.  We also now store caches copied of the NVMe compliance
version and the flag if a controller is attached to a subsystem or not in
the generic controller structure now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
[Fixes for pr merge]
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit f3ca80fc11c3af566eacd99cf821c1a48035c63b)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/scsi.c