Skip to content
Snippets Groups Projects
Commit e36a261d authored by Minwoo Im's avatar Minwoo Im Committed by Klaus Jensen
Browse files

hw/block/nvme: support for multi-controller in subsystem


We have nvme-subsys and nvme devices mapped together.  To support
multi-controller scheme to this setup, controller identifier(id) has to
be managed.  Earlier, cntlid(controller id) used to be always 0 because
we didn't have any subsystem scheme that controller id matters.

This patch introduced 'cntlid' attribute to the nvme controller
instance(NvmeCtrl) and make it allocated by the nvme-subsys device
mapped to the controller.  If nvme-subsys is not given to the
controller, then it will always be 0 as it was.

Added 'ctrls' array in the nvme-subsys instance to manage attached
controllers to the subsystem with a limit(32).  This patch didn't take
list for the controllers to make it seamless with nvme-ns device.

Signed-off-by: default avatarMinwoo Im <minwoo.im.dev@gmail.com>
Tested-by: default avatarKlaus Jensen <k.jensen@samsung.com>
Reviewed-by: default avatarKlaus Jensen <k.jensen@samsung.com>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarKlaus Jensen <k.jensen@samsung.com>
parent 66b7e9be
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment