[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V4 4/6] hw/block/nvme: support for multi-controller in subsys
From: |
Keith Busch |
Subject: |
Re: [PATCH V4 4/6] hw/block/nvme: support for multi-controller in subsystem |
Date: |
Thu, 21 Jan 2021 15:17:16 -0800 |
On Fri, Jan 22, 2021 at 07:09:06AM +0900, Minwoo Im wrote:
> -static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev)
> +static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev, uint16_t cntlid)
> {
> NvmeIdCtrl *id = &n->id_ctrl;
> uint8_t *pci_conf = pci_dev->config;
>
> + n->cntlid = cntlid;
I don't think 'cntlid' is important enough to be a function parameter.
You can just set it within the 'NvmeCtrl' struct before calling this
function like all the other properties.
> @@ -4517,7 +4543,11 @@ static void nvme_realize(PCIDevice *pci_dev, Error
> **errp)
> return;
> }
>
> - nvme_init_ctrl(n, pci_dev);
> + cntlid = nvme_init_subsys(n, errp);
> + if (cntlid < 0) {
error_propogate();
> + return;
> + }
> + nvme_init_ctrl(n, pci_dev, cntlid);
- [PATCH V4 0/6] hw/block/nvme: support multi-path for ctrl/ns, Minwoo Im, 2021/01/21
- [PATCH V4 1/6] hw/block/nvme: introduce nvme-subsys device, Minwoo Im, 2021/01/21
- [PATCH V4 2/6] hw/block/nvme: support to map controller to a subsystem, Minwoo Im, 2021/01/21
- [PATCH V4 3/6] hw/block/nvme: add CMIC enum value for Identify Controller, Minwoo Im, 2021/01/21
- [PATCH V4 4/6] hw/block/nvme: support for multi-controller in subsystem, Minwoo Im, 2021/01/21
- Re: [PATCH V4 4/6] hw/block/nvme: support for multi-controller in subsystem,
Keith Busch <=
- [PATCH V4 6/6] hw/block/nvme: support for shared namespace in subsystem, Minwoo Im, 2021/01/21
- [PATCH V4 5/6] hw/block/nvme: add NMIC enum value for Identify Namespace, Minwoo Im, 2021/01/21