diff options
Diffstat (limited to 'drivers/target/sbp/sbp_target.c')
-rw-r--r-- | drivers/target/sbp/sbp_target.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c index 39ddba584b30..0d6d7c1f025e 100644 --- a/drivers/target/sbp/sbp_target.c +++ b/drivers/target/sbp/sbp_target.c | |||
@@ -660,8 +660,7 @@ static void session_reconnect_expired(struct sbp_session *sess) | |||
660 | spin_lock_bh(&sess->lock); | 660 | spin_lock_bh(&sess->lock); |
661 | list_for_each_entry_safe(login, temp, &sess->login_list, link) { | 661 | list_for_each_entry_safe(login, temp, &sess->login_list, link) { |
662 | login->sess = NULL; | 662 | login->sess = NULL; |
663 | list_del(&login->link); | 663 | list_move_tail(&login->link, &login_list); |
664 | list_add_tail(&login->link, &login_list); | ||
665 | } | 664 | } |
666 | spin_unlock_bh(&sess->lock); | 665 | spin_unlock_bh(&sess->lock); |
667 | 666 | ||
@@ -1847,16 +1846,6 @@ static int sbp_queue_tm_rsp(struct se_cmd *se_cmd) | |||
1847 | return 0; | 1846 | return 0; |
1848 | } | 1847 | } |
1849 | 1848 | ||
1850 | static u16 sbp_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length) | ||
1851 | { | ||
1852 | return 0; | ||
1853 | } | ||
1854 | |||
1855 | static u16 sbp_get_fabric_sense_len(void) | ||
1856 | { | ||
1857 | return 0; | ||
1858 | } | ||
1859 | |||
1860 | static int sbp_check_stop_free(struct se_cmd *se_cmd) | 1849 | static int sbp_check_stop_free(struct se_cmd *se_cmd) |
1861 | { | 1850 | { |
1862 | struct sbp_target_request *req = container_of(se_cmd, | 1851 | struct sbp_target_request *req = container_of(se_cmd, |
@@ -2068,7 +2057,7 @@ static int sbp_update_unit_directory(struct sbp_tport *tport) | |||
2068 | return ret; | 2057 | return ret; |
2069 | } | 2058 | } |
2070 | 2059 | ||
2071 | static ssize_t sbp_parse_wwn(const char *name, u64 *wwn, int strict) | 2060 | static ssize_t sbp_parse_wwn(const char *name, u64 *wwn) |
2072 | { | 2061 | { |
2073 | const char *cp; | 2062 | const char *cp; |
2074 | char c, nibble; | 2063 | char c, nibble; |
@@ -2088,7 +2077,7 @@ static ssize_t sbp_parse_wwn(const char *name, u64 *wwn, int strict) | |||
2088 | err = 3; | 2077 | err = 3; |
2089 | if (isdigit(c)) | 2078 | if (isdigit(c)) |
2090 | nibble = c - '0'; | 2079 | nibble = c - '0'; |
2091 | else if (isxdigit(c) && (islower(c) || !strict)) | 2080 | else if (isxdigit(c)) |
2092 | nibble = tolower(c) - 'a' + 10; | 2081 | nibble = tolower(c) - 'a' + 10; |
2093 | else | 2082 | else |
2094 | goto fail; | 2083 | goto fail; |
@@ -2117,7 +2106,7 @@ static struct se_node_acl *sbp_make_nodeacl( | |||
2117 | u64 guid = 0; | 2106 | u64 guid = 0; |
2118 | u32 nexus_depth = 1; | 2107 | u32 nexus_depth = 1; |
2119 | 2108 | ||
2120 | if (sbp_parse_wwn(name, &guid, 1) < 0) | 2109 | if (sbp_parse_wwn(name, &guid) < 0) |
2121 | return ERR_PTR(-EINVAL); | 2110 | return ERR_PTR(-EINVAL); |
2122 | 2111 | ||
2123 | se_nacl_new = sbp_alloc_fabric_acl(se_tpg); | 2112 | se_nacl_new = sbp_alloc_fabric_acl(se_tpg); |
@@ -2253,7 +2242,7 @@ static struct se_wwn *sbp_make_tport( | |||
2253 | struct sbp_tport *tport; | 2242 | struct sbp_tport *tport; |
2254 | u64 guid = 0; | 2243 | u64 guid = 0; |
2255 | 2244 | ||
2256 | if (sbp_parse_wwn(name, &guid, 1) < 0) | 2245 | if (sbp_parse_wwn(name, &guid) < 0) |
2257 | return ERR_PTR(-EINVAL); | 2246 | return ERR_PTR(-EINVAL); |
2258 | 2247 | ||
2259 | tport = kzalloc(sizeof(*tport), GFP_KERNEL); | 2248 | tport = kzalloc(sizeof(*tport), GFP_KERNEL); |
@@ -2534,8 +2523,6 @@ static struct target_core_fabric_ops sbp_ops = { | |||
2534 | .queue_data_in = sbp_queue_data_in, | 2523 | .queue_data_in = sbp_queue_data_in, |
2535 | .queue_status = sbp_queue_status, | 2524 | .queue_status = sbp_queue_status, |
2536 | .queue_tm_rsp = sbp_queue_tm_rsp, | 2525 | .queue_tm_rsp = sbp_queue_tm_rsp, |
2537 | .get_fabric_sense_len = sbp_get_fabric_sense_len, | ||
2538 | .set_fabric_sense_len = sbp_set_fabric_sense_len, | ||
2539 | .check_stop_free = sbp_check_stop_free, | 2526 | .check_stop_free = sbp_check_stop_free, |
2540 | 2527 | ||
2541 | .fabric_make_wwn = sbp_make_tport, | 2528 | .fabric_make_wwn = sbp_make_tport, |
@@ -2556,9 +2543,9 @@ static int sbp_register_configfs(void) | |||
2556 | int ret; | 2543 | int ret; |
2557 | 2544 | ||
2558 | fabric = target_fabric_configfs_init(THIS_MODULE, "sbp"); | 2545 | fabric = target_fabric_configfs_init(THIS_MODULE, "sbp"); |
2559 | if (!fabric) { | 2546 | if (IS_ERR(fabric)) { |
2560 | pr_err("target_fabric_configfs_init() failed\n"); | 2547 | pr_err("target_fabric_configfs_init() failed\n"); |
2561 | return -ENOMEM; | 2548 | return PTR_ERR(fabric); |
2562 | } | 2549 | } |
2563 | 2550 | ||
2564 | fabric->tf_ops = sbp_ops; | 2551 | fabric->tf_ops = sbp_ops; |