Commit a2f35bcc authored by Ben Walker's avatar Ben Walker
Browse files

nvme: Remove nvme_attach



Change-Id: Ia688e49574d8d80f1473f93f127586ca5aaa7d91
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 4af9f06c
Loading
Loading
Loading
Loading
+2 −15
Original line number Diff line number Diff line
@@ -43,19 +43,6 @@ int32_t spdk_nvme_retry_count;

static int		hotplug_fd = -1;

struct spdk_nvme_ctrlr *
nvme_attach(enum spdk_nvme_transport_type trtype,
	    const struct spdk_nvme_ctrlr_opts *opts,
	    const struct spdk_nvme_probe_info *probe_info,
	    void *devhandle)
{
	struct spdk_nvme_ctrlr	*ctrlr;

	ctrlr = nvme_transport_ctrlr_construct(trtype, opts, probe_info, devhandle);

	return ctrlr;
}

int
spdk_nvme_detach(struct spdk_nvme_ctrlr *ctrlr)
{
@@ -324,9 +311,9 @@ 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_attach(trtype, &opts, probe_info, devhandle);
		ctrlr = nvme_transport_ctrlr_construct(trtype, &opts, probe_info, devhandle);
		if (ctrlr == NULL) {
			SPDK_ERRLOG("nvme_attach() failed\n");
			SPDK_ERRLOG("Failed to construct NVMe controller\n");
			return -1;
		}

+0 −4
Original line number Diff line number Diff line
@@ -552,10 +552,6 @@ int nvme_robust_mutex_init_recursive_shared(pthread_mutex_t *mtx);
bool	nvme_completion_is_retry(const struct spdk_nvme_cpl *cpl);
void	nvme_qpair_print_command(struct spdk_nvme_qpair *qpair, struct spdk_nvme_cmd *cmd);
void	nvme_qpair_print_completion(struct spdk_nvme_qpair *qpair, struct spdk_nvme_cpl *cpl);
struct	spdk_nvme_ctrlr *nvme_attach(enum spdk_nvme_transport_type trtype,
				     const struct spdk_nvme_ctrlr_opts *opts,
				     const struct spdk_nvme_probe_info *probe_info,
				     void *devhandle);

/* Transport specific functions */
#define DECLARE_TRANSPORT(name) \
+1 −1
Original line number Diff line number Diff line
@@ -1068,7 +1068,7 @@ nvme_rdma_ctrlr_scan(enum spdk_nvme_transport_type trtype,
	snprintf(probe_info.trsvcid, sizeof(probe_info.trsvcid), "%s", trid->trsvcid);

	memset(buffer, 0x0, 4096);
	discovery_ctrlr = nvme_attach(trtype, &discovery_opts, &probe_info, NULL);
	discovery_ctrlr = nvme_rdma_ctrlr_construct(trtype, &discovery_opts, &probe_info, devhandle);
	if (discovery_ctrlr == NULL) {
		return -1;
	}