nvme: Rename nvme_probe_one to nvme_ctrlr_probe
Simplify the arguments as well. Change-Id: I653e1aad4e574cf95d793b41b749cb19e0024c2b Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
7473d6b37c
commit
34100924e4
@ -302,8 +302,8 @@ nvme_driver_init(void)
|
||||
}
|
||||
|
||||
int
|
||||
nvme_probe_one(enum spdk_nvme_transport_type trtype, spdk_nvme_probe_cb probe_cb, void *cb_ctx,
|
||||
struct spdk_nvme_probe_info *probe_info, void *devhandle)
|
||||
nvme_ctrlr_probe(struct spdk_nvme_probe_info *probe_info, void *devhandle,
|
||||
spdk_nvme_probe_cb probe_cb, void *cb_ctx)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_ctrlr_opts opts;
|
||||
@ -311,7 +311,7 @@ nvme_probe_one(enum spdk_nvme_transport_type trtype, spdk_nvme_probe_cb probe_cb
|
||||
spdk_nvme_ctrlr_opts_set_defaults(&opts);
|
||||
|
||||
if (probe_cb(cb_ctx, probe_info, &opts)) {
|
||||
ctrlr = nvme_transport_ctrlr_construct(trtype, &opts, probe_info, devhandle);
|
||||
ctrlr = nvme_transport_ctrlr_construct(probe_info->trid.trtype, &opts, probe_info, devhandle);
|
||||
if (ctrlr == NULL) {
|
||||
SPDK_ERRLOG("Failed to construct NVMe controller\n");
|
||||
return -1;
|
||||
|
@ -507,8 +507,8 @@ void nvme_completion_poll_cb(void *arg, const struct spdk_nvme_cpl *cpl);
|
||||
int nvme_ctrlr_add_process(struct spdk_nvme_ctrlr *ctrlr, void *devhandle);
|
||||
void nvme_ctrlr_free_processes(struct spdk_nvme_ctrlr *ctrlr);
|
||||
|
||||
int nvme_probe_one(enum spdk_nvme_transport_type trtype, spdk_nvme_probe_cb probe_cb, void *cb_ctx,
|
||||
struct spdk_nvme_probe_info *probe_info, void *devhandle);
|
||||
int nvme_ctrlr_probe(struct spdk_nvme_probe_info *probe_info, void *devhandle,
|
||||
spdk_nvme_probe_cb probe_cb, void *cb_ctx);
|
||||
|
||||
int nvme_ctrlr_construct(struct spdk_nvme_ctrlr *ctrlr);
|
||||
void nvme_ctrlr_destruct(struct spdk_nvme_ctrlr *ctrlr);
|
||||
|
@ -530,6 +530,7 @@ pcie_nvme_enum_cb(void *ctx, struct spdk_pci_device *pci_dev)
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
int rc = 0;
|
||||
|
||||
probe_info.trid.trtype = SPDK_NVME_TRANSPORT_PCIE;
|
||||
probe_info.pci_addr = spdk_pci_device_get_addr(pci_dev);
|
||||
probe_info.pci_id = spdk_pci_device_get_id(pci_dev);
|
||||
|
||||
@ -547,8 +548,8 @@ pcie_nvme_enum_cb(void *ctx, struct spdk_pci_device *pci_dev)
|
||||
}
|
||||
}
|
||||
|
||||
return nvme_probe_one(SPDK_NVME_TRANSPORT_PCIE, enum_ctx->probe_cb, enum_ctx->cb_ctx,
|
||||
&probe_info, pci_dev);
|
||||
return nvme_ctrlr_probe(&probe_info, pci_dev,
|
||||
enum_ctx->probe_cb, enum_ctx->cb_ctx);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1143,8 +1143,8 @@ nvme_rdma_ctrlr_scan(const struct spdk_nvme_transport_id *trid,
|
||||
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "subnqn=%s, trtype=%u, traddr=%s, trsvcid=%s\n",
|
||||
probe_info.trid.subnqn, probe_info.trid.trtype,
|
||||
probe_info.trid.traddr, probe_info.trid.trsvcid);
|
||||
/* Todo: need to differentiate the NVMe over fabrics to avoid duplicated connection */
|
||||
nvme_probe_one(entry->trtype, probe_cb, cb_ctx, &probe_info, NULL);
|
||||
|
||||
nvme_ctrlr_probe(&probe_info, NULL, probe_cb, cb_ctx);
|
||||
}
|
||||
|
||||
nvme_ctrlr_destruct(discovery_ctrlr);
|
||||
|
Loading…
Reference in New Issue
Block a user