Lines Matching defs:g_ctrlr
19 static struct ctrlr g_ctrlr;
38 g_ctrlr.write_completed = 1;
51 ctrlr = g_ctrlr.ctrlr;
71 g_ctrlr.write_buf = spdk_zmalloc(bpsize, 0x1000, NULL,
74 if (g_ctrlr.write_buf == NULL) {
80 g_ctrlr.read_buf = spdk_memzone_reserve("boot_partition", bpsize,
83 if (g_ctrlr.read_buf == NULL) {
89 fill_pattern(g_ctrlr.write_buf, bpsize, 0xDE);
91 g_ctrlr.write_completed = 0;
92 rc = spdk_nvme_ctrlr_write_boot_partition(ctrlr, g_ctrlr.write_buf,
100 while (!g_ctrlr.write_completed) {
104 rc = spdk_nvme_ctrlr_read_boot_partition_start(ctrlr, g_ctrlr.read_buf,
123 rc = memcmp(g_ctrlr.write_buf, g_ctrlr.read_buf, bpsize);
132 fill_pattern(g_ctrlr.write_buf, bpsize, 0xAD);
134 g_ctrlr.write_completed = 0;
135 rc = spdk_nvme_ctrlr_write_boot_partition(ctrlr, g_ctrlr.write_buf,
143 while (!g_ctrlr.write_completed) {
147 rc = spdk_nvme_ctrlr_read_boot_partition_start(ctrlr, g_ctrlr.read_buf,
166 rc = memcmp(g_ctrlr.write_buf, g_ctrlr.read_buf, bpsize);
184 spdk_free(g_ctrlr.write_buf);
185 spdk_nvme_detach(g_ctrlr.ctrlr);
206 snprintf(&g_ctrlr.trid.traddr[0], SPDK_NVMF_TRADDR_MAX_LEN + 1,
209 g_ctrlr.trid.trtype = SPDK_NVME_TRANSPORT_PCIE;
211 spdk_nvme_transport_id_populate_trstring(&g_ctrlr.trid,
212 spdk_nvme_transport_id_trtype_str(g_ctrlr.trid.trtype));
260 g_ctrlr.ctrlr = spdk_nvme_connect(&g_ctrlr.trid, NULL, 0);
261 if (!g_ctrlr.ctrlr) {