Lines Matching +full:ctrl +full:- +full:module
1 /* SPDX-License-Identifier: GPL-2.0 */
4 * Copyright (c) 2015-2016 HGST, a Western Digital Company.
18 /* default is -1: the fail fast mechanism is disabled */
19 #define NVMF_DEF_FAIL_FAST_TMO -1
44 * enum nvmf_parsing_opts - used to define the sysfs parsing options used.
76 * struct nvmf_ctrl_options - Used to hold the options specified
81 * the controller, (-1) means reconnect forever, zero means remove
88 * @traddr: The transport-specific TRADDR field for a port on the
90 * @trsvcid: The transport-specific TRSVCID field for a port on the
92 * @host_traddr: A transport-specific field identifying the NVME host port
94 * @host_iface: A transport-specific field identifying the NVME host
99 * @discovery_nqn: indicates if the subsysnqn is the well-known discovery NQN.
100 * @kato: Keep-alive timeout.
102 * @dhchap_secret: DH-HMAC-CHAP secret
103 * @dhchap_ctrl_secret: DH-HMAC-CHAP controller secret for bi-directional
141 * struct nvmf_transport_ops - used to register a specific
144 * registration entry to its linked-list internal tree.
145 * @module: Transport module reference
147 * @required_opts: sysfs command-line options that must be specified
149 * @allowed_opts: sysfs command-line options that can be specified
151 * @create_ctrl(): function pointer that points to a non-NVMe
152 * implementation-specific fabric technology
162 * modules .bss section so that a pure module_get on @module
167 struct module *module; member
176 nvmf_ctlr_matches_baseopts(struct nvme_ctrl *ctrl, in nvmf_ctlr_matches_baseopts() argument
179 if (ctrl->state == NVME_CTRL_DELETING || in nvmf_ctlr_matches_baseopts()
180 ctrl->state == NVME_CTRL_DELETING_NOIO || in nvmf_ctlr_matches_baseopts()
181 ctrl->state == NVME_CTRL_DEAD || in nvmf_ctlr_matches_baseopts()
182 strcmp(opts->subsysnqn, ctrl->opts->subsysnqn) || in nvmf_ctlr_matches_baseopts()
183 strcmp(opts->host->nqn, ctrl->opts->host->nqn) || in nvmf_ctlr_matches_baseopts()
184 !uuid_equal(&opts->host->id, &ctrl->opts->host->id)) in nvmf_ctlr_matches_baseopts()
190 static inline char *nvmf_ctrl_subsysnqn(struct nvme_ctrl *ctrl) in nvmf_ctrl_subsysnqn() argument
192 if (!ctrl->subsys || in nvmf_ctrl_subsysnqn()
193 !strcmp(ctrl->opts->subsysnqn, NVME_DISC_SUBSYS_NAME)) in nvmf_ctrl_subsysnqn()
194 return ctrl->opts->subsysnqn; in nvmf_ctrl_subsysnqn()
195 return ctrl->subsys->subnqn; in nvmf_ctrl_subsysnqn()
201 nvme_req(rq)->status = NVME_SC_HOST_ABORTED_CMD; in nvmf_complete_timed_out_request()
208 return min(opts->nr_io_queues, num_online_cpus()) + in nvmf_nr_io_queues()
209 min(opts->nr_write_queues, num_online_cpus()) + in nvmf_nr_io_queues()
210 min(opts->nr_poll_queues, num_online_cpus()); in nvmf_nr_io_queues()
213 int nvmf_reg_read32(struct nvme_ctrl *ctrl, u32 off, u32 *val);
214 int nvmf_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val);
215 int nvmf_reg_write32(struct nvme_ctrl *ctrl, u32 off, u32 val);
216 int nvmf_connect_admin_queue(struct nvme_ctrl *ctrl);
217 int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid);
221 int nvmf_get_address(struct nvme_ctrl *ctrl, char *buf, int size);
222 bool nvmf_should_reconnect(struct nvme_ctrl *ctrl);
223 bool nvmf_ip_options_match(struct nvme_ctrl *ctrl,
227 void nvmf_map_queues(struct blk_mq_tag_set *set, struct nvme_ctrl *ctrl,