Lines Matching full:item
66 static ssize_t nvmet_addr_adrfam_show(struct config_item *item, char *page) in nvmet_addr_adrfam_show() argument
68 u8 adrfam = to_nvmet_port(item)->disc_addr.adrfam; in nvmet_addr_adrfam_show()
80 static ssize_t nvmet_addr_adrfam_store(struct config_item *item, in nvmet_addr_adrfam_store() argument
83 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_adrfam_store()
104 static ssize_t nvmet_addr_portid_show(struct config_item *item, in nvmet_addr_portid_show() argument
107 __le16 portid = to_nvmet_port(item)->disc_addr.portid; in nvmet_addr_portid_show()
112 static ssize_t nvmet_addr_portid_store(struct config_item *item, in nvmet_addr_portid_store() argument
115 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_portid_store()
132 static ssize_t nvmet_addr_traddr_show(struct config_item *item, in nvmet_addr_traddr_show() argument
135 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_traddr_show()
140 static ssize_t nvmet_addr_traddr_store(struct config_item *item, in nvmet_addr_traddr_store() argument
143 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_traddr_store()
171 static ssize_t nvmet_addr_treq_show(struct config_item *item, char *page) in nvmet_addr_treq_show() argument
173 u8 treq = nvmet_port_disc_addr_treq_secure_channel(to_nvmet_port(item)); in nvmet_addr_treq_show()
185 static ssize_t nvmet_addr_treq_store(struct config_item *item, in nvmet_addr_treq_store() argument
188 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_treq_store()
225 static ssize_t nvmet_addr_trsvcid_show(struct config_item *item, in nvmet_addr_trsvcid_show() argument
228 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_trsvcid_show()
233 static ssize_t nvmet_addr_trsvcid_store(struct config_item *item, in nvmet_addr_trsvcid_store() argument
236 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_trsvcid_store()
252 static ssize_t nvmet_param_inline_data_size_show(struct config_item *item, in nvmet_param_inline_data_size_show() argument
255 struct nvmet_port *port = to_nvmet_port(item); in nvmet_param_inline_data_size_show()
260 static ssize_t nvmet_param_inline_data_size_store(struct config_item *item, in nvmet_param_inline_data_size_store() argument
263 struct nvmet_port *port = to_nvmet_port(item); in nvmet_param_inline_data_size_store()
278 static ssize_t nvmet_param_max_queue_size_show(struct config_item *item, in nvmet_param_max_queue_size_show() argument
281 struct nvmet_port *port = to_nvmet_port(item); in nvmet_param_max_queue_size_show()
286 static ssize_t nvmet_param_max_queue_size_store(struct config_item *item, in nvmet_param_max_queue_size_store() argument
289 struct nvmet_port *port = to_nvmet_port(item); in nvmet_param_max_queue_size_store()
305 static ssize_t nvmet_param_pi_enable_show(struct config_item *item, in nvmet_param_pi_enable_show() argument
308 struct nvmet_port *port = to_nvmet_port(item); in nvmet_param_pi_enable_show()
313 static ssize_t nvmet_param_pi_enable_store(struct config_item *item, in nvmet_param_pi_enable_store() argument
316 struct nvmet_port *port = to_nvmet_port(item); in nvmet_param_pi_enable_store()
332 static ssize_t nvmet_addr_trtype_show(struct config_item *item, in nvmet_addr_trtype_show() argument
335 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_trtype_show()
359 static ssize_t nvmet_addr_trtype_store(struct config_item *item, in nvmet_addr_trtype_store() argument
362 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_trtype_store()
398 static ssize_t nvmet_addr_tsas_show(struct config_item *item, in nvmet_addr_tsas_show() argument
401 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_tsas_show()
440 static ssize_t nvmet_addr_tsas_store(struct config_item *item, in nvmet_addr_tsas_store() argument
443 struct nvmet_port *port = to_nvmet_port(item); in nvmet_addr_tsas_store()
498 static ssize_t nvmet_ns_device_path_show(struct config_item *item, char *page) in nvmet_ns_device_path_show() argument
500 return sprintf(page, "%s\n", to_nvmet_ns(item)->device_path); in nvmet_ns_device_path_show()
503 static ssize_t nvmet_ns_device_path_store(struct config_item *item, in nvmet_ns_device_path_store() argument
506 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_device_path_store()
538 static ssize_t nvmet_ns_p2pmem_show(struct config_item *item, char *page) in nvmet_ns_p2pmem_show() argument
540 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_p2pmem_show()
545 static ssize_t nvmet_ns_p2pmem_store(struct config_item *item, in nvmet_ns_p2pmem_store() argument
548 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_p2pmem_store()
579 static ssize_t nvmet_ns_device_uuid_show(struct config_item *item, char *page) in nvmet_ns_device_uuid_show() argument
581 return sprintf(page, "%pUb\n", &to_nvmet_ns(item)->uuid); in nvmet_ns_device_uuid_show()
584 static ssize_t nvmet_ns_device_uuid_store(struct config_item *item, in nvmet_ns_device_uuid_store() argument
587 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_device_uuid_store()
607 static ssize_t nvmet_ns_device_nguid_show(struct config_item *item, char *page) in nvmet_ns_device_nguid_show() argument
609 return sprintf(page, "%pUb\n", &to_nvmet_ns(item)->nguid); in nvmet_ns_device_nguid_show()
612 static ssize_t nvmet_ns_device_nguid_store(struct config_item *item, in nvmet_ns_device_nguid_store() argument
615 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_device_nguid_store()
653 static ssize_t nvmet_ns_ana_grpid_show(struct config_item *item, char *page) in nvmet_ns_ana_grpid_show() argument
655 return sprintf(page, "%u\n", to_nvmet_ns(item)->anagrpid); in nvmet_ns_ana_grpid_show()
658 static ssize_t nvmet_ns_ana_grpid_store(struct config_item *item, in nvmet_ns_ana_grpid_store() argument
661 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_ana_grpid_store()
687 static ssize_t nvmet_ns_enable_show(struct config_item *item, char *page) in nvmet_ns_enable_show() argument
689 return sprintf(page, "%d\n", to_nvmet_ns(item)->enabled); in nvmet_ns_enable_show()
692 static ssize_t nvmet_ns_enable_store(struct config_item *item, in nvmet_ns_enable_store() argument
695 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_enable_store()
720 static ssize_t nvmet_ns_buffered_io_show(struct config_item *item, char *page) in nvmet_ns_buffered_io_show() argument
722 return sprintf(page, "%d\n", to_nvmet_ns(item)->buffered_io); in nvmet_ns_buffered_io_show()
725 static ssize_t nvmet_ns_buffered_io_store(struct config_item *item, in nvmet_ns_buffered_io_store() argument
728 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_buffered_io_store()
748 static ssize_t nvmet_ns_revalidate_size_store(struct config_item *item, in nvmet_ns_revalidate_size_store() argument
751 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_revalidate_size_store()
774 static ssize_t nvmet_ns_resv_enable_show(struct config_item *item, char *page) in nvmet_ns_resv_enable_show() argument
776 return sysfs_emit(page, "%d\n", to_nvmet_ns(item)->pr.enable); in nvmet_ns_resv_enable_show()
779 static ssize_t nvmet_ns_resv_enable_store(struct config_item *item, in nvmet_ns_resv_enable_store() argument
782 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_resv_enable_store()
815 static void nvmet_ns_release(struct config_item *item) in nvmet_ns_release() argument
817 struct nvmet_ns *ns = to_nvmet_ns(item); in nvmet_ns_release()
874 static ssize_t nvmet_passthru_device_path_show(struct config_item *item, in nvmet_passthru_device_path_show() argument
877 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_device_path_show()
882 static ssize_t nvmet_passthru_device_path_store(struct config_item *item, in nvmet_passthru_device_path_store() argument
885 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_device_path_store()
915 static ssize_t nvmet_passthru_enable_show(struct config_item *item, in nvmet_passthru_enable_show() argument
918 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_enable_show()
923 static ssize_t nvmet_passthru_enable_store(struct config_item *item, in nvmet_passthru_enable_store() argument
926 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_enable_store()
942 static ssize_t nvmet_passthru_admin_timeout_show(struct config_item *item, in nvmet_passthru_admin_timeout_show() argument
945 return sprintf(page, "%u\n", to_subsys(item->ci_parent)->admin_timeout); in nvmet_passthru_admin_timeout_show()
948 static ssize_t nvmet_passthru_admin_timeout_store(struct config_item *item, in nvmet_passthru_admin_timeout_store() argument
951 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_admin_timeout_store()
961 static ssize_t nvmet_passthru_io_timeout_show(struct config_item *item, in nvmet_passthru_io_timeout_show() argument
964 return sprintf(page, "%u\n", to_subsys(item->ci_parent)->io_timeout); in nvmet_passthru_io_timeout_show()
967 static ssize_t nvmet_passthru_io_timeout_store(struct config_item *item, in nvmet_passthru_io_timeout_store() argument
970 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_io_timeout_store()
980 static ssize_t nvmet_passthru_clear_ids_show(struct config_item *item, in nvmet_passthru_clear_ids_show() argument
983 return sprintf(page, "%u\n", to_subsys(item->ci_parent)->clear_ids); in nvmet_passthru_clear_ids_show()
986 static ssize_t nvmet_passthru_clear_ids_store(struct config_item *item, in nvmet_passthru_clear_ids_store() argument
989 struct nvmet_subsys *subsys = to_subsys(item->ci_parent); in nvmet_passthru_clear_ids_store()
1183 static ssize_t nvmet_subsys_attr_allow_any_host_show(struct config_item *item, in nvmet_subsys_attr_allow_any_host_show() argument
1187 to_subsys(item)->allow_any_host); in nvmet_subsys_attr_allow_any_host_show()
1190 static ssize_t nvmet_subsys_attr_allow_any_host_store(struct config_item *item, in nvmet_subsys_attr_allow_any_host_store() argument
1193 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_allow_any_host_store()
1219 static ssize_t nvmet_subsys_attr_version_show(struct config_item *item, in nvmet_subsys_attr_version_show() argument
1222 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_version_show()
1268 static ssize_t nvmet_subsys_attr_version_store(struct config_item *item, in nvmet_subsys_attr_version_store() argument
1271 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_version_store()
1290 static ssize_t nvmet_subsys_attr_serial_show(struct config_item *item, in nvmet_subsys_attr_serial_show() argument
1293 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_serial_show()
1329 static ssize_t nvmet_subsys_attr_serial_store(struct config_item *item, in nvmet_subsys_attr_serial_store() argument
1332 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_serial_store()
1345 static ssize_t nvmet_subsys_attr_cntlid_min_show(struct config_item *item, in nvmet_subsys_attr_cntlid_min_show() argument
1348 return snprintf(page, PAGE_SIZE, "%u\n", to_subsys(item)->cntlid_min); in nvmet_subsys_attr_cntlid_min_show()
1351 static ssize_t nvmet_subsys_attr_cntlid_min_store(struct config_item *item, in nvmet_subsys_attr_cntlid_min_store() argument
1363 if (cntlid_min > to_subsys(item)->cntlid_max) in nvmet_subsys_attr_cntlid_min_store()
1365 to_subsys(item)->cntlid_min = cntlid_min; in nvmet_subsys_attr_cntlid_min_store()
1375 static ssize_t nvmet_subsys_attr_cntlid_max_show(struct config_item *item, in nvmet_subsys_attr_cntlid_max_show() argument
1378 return snprintf(page, PAGE_SIZE, "%u\n", to_subsys(item)->cntlid_max); in nvmet_subsys_attr_cntlid_max_show()
1381 static ssize_t nvmet_subsys_attr_cntlid_max_store(struct config_item *item, in nvmet_subsys_attr_cntlid_max_store() argument
1393 if (cntlid_max < to_subsys(item)->cntlid_min) in nvmet_subsys_attr_cntlid_max_store()
1395 to_subsys(item)->cntlid_max = cntlid_max; in nvmet_subsys_attr_cntlid_max_store()
1405 static ssize_t nvmet_subsys_attr_vendor_id_show(struct config_item *item, in nvmet_subsys_attr_vendor_id_show() argument
1408 return snprintf(page, PAGE_SIZE, "0x%x\n", to_subsys(item)->vendor_id); in nvmet_subsys_attr_vendor_id_show()
1411 static ssize_t nvmet_subsys_attr_vendor_id_store(struct config_item *item, in nvmet_subsys_attr_vendor_id_store() argument
1420 to_subsys(item)->vendor_id = vid; in nvmet_subsys_attr_vendor_id_store()
1426 static ssize_t nvmet_subsys_attr_subsys_vendor_id_show(struct config_item *item, in nvmet_subsys_attr_subsys_vendor_id_show() argument
1430 to_subsys(item)->subsys_vendor_id); in nvmet_subsys_attr_subsys_vendor_id_show()
1433 static ssize_t nvmet_subsys_attr_subsys_vendor_id_store(struct config_item *item, in nvmet_subsys_attr_subsys_vendor_id_store() argument
1442 to_subsys(item)->subsys_vendor_id = ssvid; in nvmet_subsys_attr_subsys_vendor_id_store()
1448 static ssize_t nvmet_subsys_attr_model_show(struct config_item *item, in nvmet_subsys_attr_model_show() argument
1451 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_model_show()
1491 static ssize_t nvmet_subsys_attr_model_store(struct config_item *item, in nvmet_subsys_attr_model_store() argument
1494 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_model_store()
1507 static ssize_t nvmet_subsys_attr_ieee_oui_show(struct config_item *item, in nvmet_subsys_attr_ieee_oui_show() argument
1510 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_ieee_oui_show()
1539 static ssize_t nvmet_subsys_attr_ieee_oui_store(struct config_item *item, in nvmet_subsys_attr_ieee_oui_store() argument
1542 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_ieee_oui_store()
1555 static ssize_t nvmet_subsys_attr_firmware_show(struct config_item *item, in nvmet_subsys_attr_firmware_show() argument
1558 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_firmware_show()
1601 static ssize_t nvmet_subsys_attr_firmware_store(struct config_item *item, in nvmet_subsys_attr_firmware_store() argument
1604 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_firmware_store()
1618 static ssize_t nvmet_subsys_attr_pi_enable_show(struct config_item *item, in nvmet_subsys_attr_pi_enable_show() argument
1621 return snprintf(page, PAGE_SIZE, "%d\n", to_subsys(item)->pi_support); in nvmet_subsys_attr_pi_enable_show()
1624 static ssize_t nvmet_subsys_attr_pi_enable_store(struct config_item *item, in nvmet_subsys_attr_pi_enable_store() argument
1627 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_pi_enable_store()
1639 static ssize_t nvmet_subsys_attr_qid_max_show(struct config_item *item, in nvmet_subsys_attr_qid_max_show() argument
1642 return snprintf(page, PAGE_SIZE, "%u\n", to_subsys(item)->max_qid); in nvmet_subsys_attr_qid_max_show()
1645 static ssize_t nvmet_subsys_attr_qid_max_store(struct config_item *item, in nvmet_subsys_attr_qid_max_store() argument
1648 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_attr_qid_max_store()
1691 static void nvmet_subsys_release(struct config_item *item) in nvmet_subsys_release() argument
1693 struct nvmet_subsys *subsys = to_subsys(item); in nvmet_subsys_release()
1753 static ssize_t nvmet_referral_enable_show(struct config_item *item, in nvmet_referral_enable_show() argument
1756 return snprintf(page, PAGE_SIZE, "%d\n", to_nvmet_port(item)->enabled); in nvmet_referral_enable_show()
1759 static ssize_t nvmet_referral_enable_store(struct config_item *item, in nvmet_referral_enable_store() argument
1762 struct nvmet_port *parent = to_nvmet_port(item->ci_parent->ci_parent); in nvmet_referral_enable_store()
1763 struct nvmet_port *port = to_nvmet_port(item); in nvmet_referral_enable_store()
1797 struct config_item *item) in nvmet_referral_notify() argument
1799 struct nvmet_port *parent = to_nvmet_port(item->ci_parent->ci_parent); in nvmet_referral_notify()
1800 struct nvmet_port *port = to_nvmet_port(item); in nvmet_referral_notify()
1805 static void nvmet_referral_release(struct config_item *item) in nvmet_referral_release() argument
1807 struct nvmet_port *port = to_nvmet_port(item); in nvmet_referral_release()
1856 static ssize_t nvmet_ana_group_ana_state_show(struct config_item *item, in nvmet_ana_group_ana_state_show() argument
1859 struct nvmet_ana_group *grp = to_ana_group(item); in nvmet_ana_group_ana_state_show()
1871 static ssize_t nvmet_ana_group_ana_state_store(struct config_item *item, in nvmet_ana_group_ana_state_store() argument
1874 struct nvmet_ana_group *grp = to_ana_group(item); in nvmet_ana_group_ana_state_store()
1902 static void nvmet_ana_group_release(struct config_item *item) in nvmet_ana_group_release() argument
1904 struct nvmet_ana_group *grp = to_ana_group(item); in nvmet_ana_group_release()
1976 static void nvmet_port_release(struct config_item *item) in nvmet_port_release() argument
1978 struct nvmet_port *port = to_nvmet_port(item); in nvmet_port_release()
2100 static ssize_t nvmet_host_dhchap_key_show(struct config_item *item, in nvmet_host_dhchap_key_show() argument
2107 dhchap_secret = to_host(item)->dhchap_secret; in nvmet_host_dhchap_key_show()
2116 static ssize_t nvmet_host_dhchap_key_store(struct config_item *item, in nvmet_host_dhchap_key_store() argument
2119 struct nvmet_host *host = to_host(item); in nvmet_host_dhchap_key_store()
2133 static ssize_t nvmet_host_dhchap_ctrl_key_show(struct config_item *item, in nvmet_host_dhchap_ctrl_key_show() argument
2136 u8 *dhchap_secret = to_host(item)->dhchap_ctrl_secret; in nvmet_host_dhchap_ctrl_key_show()
2140 dhchap_secret = to_host(item)->dhchap_ctrl_secret; in nvmet_host_dhchap_ctrl_key_show()
2149 static ssize_t nvmet_host_dhchap_ctrl_key_store(struct config_item *item, in nvmet_host_dhchap_ctrl_key_store() argument
2152 struct nvmet_host *host = to_host(item); in nvmet_host_dhchap_ctrl_key_store()
2166 static ssize_t nvmet_host_dhchap_hash_show(struct config_item *item, in nvmet_host_dhchap_hash_show() argument
2169 struct nvmet_host *host = to_host(item); in nvmet_host_dhchap_hash_show()
2175 static ssize_t nvmet_host_dhchap_hash_store(struct config_item *item, in nvmet_host_dhchap_hash_store() argument
2178 struct nvmet_host *host = to_host(item); in nvmet_host_dhchap_hash_store()
2192 static ssize_t nvmet_host_dhchap_dhgroup_show(struct config_item *item, in nvmet_host_dhchap_dhgroup_show() argument
2195 struct nvmet_host *host = to_host(item); in nvmet_host_dhchap_dhgroup_show()
2201 static ssize_t nvmet_host_dhchap_dhgroup_store(struct config_item *item, in nvmet_host_dhchap_dhgroup_store() argument
2204 struct nvmet_host *host = to_host(item); in nvmet_host_dhchap_dhgroup_store()
2231 static void nvmet_host_release(struct config_item *item) in nvmet_host_release() argument
2233 struct nvmet_host *host = to_host(item); in nvmet_host_release()
2284 static ssize_t nvmet_root_discovery_nqn_show(struct config_item *item, in nvmet_root_discovery_nqn_show() argument
2290 static ssize_t nvmet_root_discovery_nqn_store(struct config_item *item, in nvmet_root_discovery_nqn_store() argument
2307 struct config_item *item = in nvmet_root_discovery_nqn_store() local
2310 if (!strncmp(config_item_name(item), page, len)) { in nvmet_root_discovery_nqn_store()
2311 pr_err("duplicate NQN %s\n", config_item_name(item)); in nvmet_root_discovery_nqn_store()