diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-01-20 14:01:31 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-01-20 14:01:31 -0300 |
commit | b4b7ff4b08e691656c9d77c758fc355833128ac0 (patch) | |
tree | 82fcb00e6b918026dc9f2d1f05ed8eee83874cc0 /drivers/target/loopback | |
parent | 35acfa0fc609f2a2cd95cef4a6a9c3a5c38f1778 (diff) |
Linux-libre 4.4-gnupck-4.4-gnu
Diffstat (limited to 'drivers/target/loopback')
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 61 |
1 files changed, 26 insertions, 35 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 5bc85ffed..4fb0eca86 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -34,7 +34,6 @@ #include <target/target_core_base.h> #include <target/target_core_fabric.h> -#include <target/target_core_fabric_configfs.h> #include "tcm_loop.h" @@ -377,7 +376,6 @@ static struct scsi_host_template tcm_loop_driver_template = { .use_clustering = DISABLE_CLUSTERING, .slave_alloc = tcm_loop_slave_alloc, .module = THIS_MODULE, - .use_blk_tags = 1, .track_queue_depth = 1, }; @@ -763,21 +761,20 @@ static void tcm_loop_port_unlink( /* End items for tcm_loop_port_cit */ -static ssize_t tcm_loop_tpg_attrib_show_fabric_prot_type( - struct se_portal_group *se_tpg, - char *page) +static ssize_t tcm_loop_tpg_attrib_fabric_prot_type_show( + struct config_item *item, char *page) { + struct se_portal_group *se_tpg = attrib_to_tpg(item); struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, struct tcm_loop_tpg, tl_se_tpg); return sprintf(page, "%d\n", tl_tpg->tl_fabric_prot_type); } -static ssize_t tcm_loop_tpg_attrib_store_fabric_prot_type( - struct se_portal_group *se_tpg, - const char *page, - size_t count) +static ssize_t tcm_loop_tpg_attrib_fabric_prot_type_store( + struct config_item *item, const char *page, size_t count) { + struct se_portal_group *se_tpg = attrib_to_tpg(item); struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, struct tcm_loop_tpg, tl_se_tpg); unsigned long val; @@ -796,10 +793,10 @@ static ssize_t tcm_loop_tpg_attrib_store_fabric_prot_type( return count; } -TF_TPG_ATTRIB_ATTR(tcm_loop, fabric_prot_type, S_IRUGO | S_IWUSR); +CONFIGFS_ATTR(tcm_loop_tpg_attrib_, fabric_prot_type); static struct configfs_attribute *tcm_loop_tpg_attrib_attrs[] = { - &tcm_loop_tpg_attrib_fabric_prot_type.attr, + &tcm_loop_tpg_attrib_attr_fabric_prot_type, NULL, }; @@ -894,10 +891,9 @@ static int tcm_loop_drop_nexus( /* End items for tcm_loop_nexus_cit */ -static ssize_t tcm_loop_tpg_show_nexus( - struct se_portal_group *se_tpg, - char *page) +static ssize_t tcm_loop_tpg_nexus_show(struct config_item *item, char *page) { + struct se_portal_group *se_tpg = to_tpg(item); struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, struct tcm_loop_tpg, tl_se_tpg); struct tcm_loop_nexus *tl_nexus; @@ -913,11 +909,10 @@ static ssize_t tcm_loop_tpg_show_nexus( return ret; } -static ssize_t tcm_loop_tpg_store_nexus( - struct se_portal_group *se_tpg, - const char *page, - size_t count) +static ssize_t tcm_loop_tpg_nexus_store(struct config_item *item, + const char *page, size_t count) { + struct se_portal_group *se_tpg = to_tpg(item); struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, struct tcm_loop_tpg, tl_se_tpg); struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; @@ -992,12 +987,10 @@ check_newline: return count; } -TF_TPG_BASE_ATTR(tcm_loop, nexus, S_IRUGO | S_IWUSR); - -static ssize_t tcm_loop_tpg_show_transport_status( - struct se_portal_group *se_tpg, - char *page) +static ssize_t tcm_loop_tpg_transport_status_show(struct config_item *item, + char *page) { + struct se_portal_group *se_tpg = to_tpg(item); struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, struct tcm_loop_tpg, tl_se_tpg); const char *status = NULL; @@ -1020,11 +1013,10 @@ static ssize_t tcm_loop_tpg_show_transport_status( return ret; } -static ssize_t tcm_loop_tpg_store_transport_status( - struct se_portal_group *se_tpg, - const char *page, - size_t count) +static ssize_t tcm_loop_tpg_transport_status_store(struct config_item *item, + const char *page, size_t count) { + struct se_portal_group *se_tpg = to_tpg(item); struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, struct tcm_loop_tpg, tl_se_tpg); @@ -1044,11 +1036,12 @@ static ssize_t tcm_loop_tpg_store_transport_status( return -EINVAL; } -TF_TPG_BASE_ATTR(tcm_loop, transport_status, S_IRUGO | S_IWUSR); +CONFIGFS_ATTR(tcm_loop_tpg_, nexus); +CONFIGFS_ATTR(tcm_loop_tpg_, transport_status); static struct configfs_attribute *tcm_loop_tpg_attrs[] = { - &tcm_loop_tpg_nexus.attr, - &tcm_loop_tpg_transport_status.attr, + &tcm_loop_tpg_attr_nexus, + &tcm_loop_tpg_attr_transport_status, NULL, }; @@ -1216,17 +1209,15 @@ static void tcm_loop_drop_scsi_hba( } /* Start items for tcm_loop_cit */ -static ssize_t tcm_loop_wwn_show_attr_version( - struct target_fabric_configfs *tf, - char *page) +static ssize_t tcm_loop_wwn_version_show(struct config_item *item, char *page) { return sprintf(page, "TCM Loopback Fabric module %s\n", TCM_LOOP_VERSION); } -TF_WWN_ATTR_RO(tcm_loop, version); +CONFIGFS_ATTR_RO(tcm_loop_wwn_, version); static struct configfs_attribute *tcm_loop_wwn_attrs[] = { - &tcm_loop_wwn_version.attr, + &tcm_loop_wwn_attr_version, NULL, }; |