40 pr_err(
"Unable to allocate struct iscsi_portal_group\n");
67 pr_err(
"Unable to allocate struct iscsi_portal_group\n");
81 iscsit_set_default_tpg_attribs(tpg);
105 pr_debug(
"CORE[0] - Allocated Discovery TPG\n");
147 if (tpg_np->
tpg_np == np) {
166 return ((ret != 0) || signal_pending(
current)) ? -1 : 0;
174 static void iscsit_clear_tpg_np_login_thread(
179 pr_err(
"struct iscsi_tpg_np->tpg_np is NULL!\n");
194 pr_err(
"struct iscsi_tpg_np->tpg_np is NULL!\n");
198 iscsit_clear_tpg_np_login_thread(tpg_np, tpg);
226 pr_err(
"Unable to add iSCSI Target Portal Group: %d"
227 " while not in TPG_STATE_FREE state.\n", tpg->
tpgt);
230 iscsit_set_default_tpg_attribs(tpg);
244 pr_debug(
"CORE[%s]_TPG[%hu] - Added iSCSI Target Portal Group\n",
270 pr_err(
"Unable to delete iSCSI Target Portal Group:"
271 " %hu while active sessions exist, and force=0\n",
295 pr_debug(
"CORE[%s]_TPG[%hu] - Deleted iSCSI Target Portal Group\n",
310 pr_err(
"iSCSI target portal group: %hu is already"
311 " active, ignoring request.\n", tpg->
tpgt);
343 pr_debug(
"iSCSI_TPG[%hu] - Enabled iSCSI Target Portal Group\n",
361 pr_err(
"iSCSI Target Portal Group: %hu is already"
362 " inactive, ignoring request.\n", tpg->
tpgt);
375 pr_err(
"Unable to disable iSCSI Target Portal Group:"
376 " %hu while active sessions exist, and force=0\n",
387 pr_debug(
"iSCSI_TPG[%hu] - Disabled iSCSI Target Portal Group\n",
407 int network_transport)
414 if (tpg_np_child->
tpg_np->np_network_transport ==
430 int network_transport)
437 pr_err(
"Unable to allocate memory for"
438 " struct iscsi_tpg_np.\n");
470 pr_debug(
"CORE[%s] - Added Network Portal: %s:%hu,%hu on %s\n",
477 static int iscsit_tpg_release_np(
482 iscsit_clear_tpg_np_login_thread(tpg_np, tpg);
484 pr_debug(
"CORE[%s] - Removed Network Portal: %s:%hu,%hu on %s\n",
507 pr_err(
"Unable to locate struct iscsi_np from"
508 " struct iscsi_tpg_np\n");
523 pr_err(
"iscsit_tpg_del_network_portal()"
524 " failed: %d\n", ret);
543 return iscsit_tpg_release_np(tpg_np, tpg, np);
548 unsigned char *initiatorname,
553 initiatorname, queue_depth, force);
558 unsigned char buf1[256], buf2[256], *
none =
NULL;
563 if ((authentication != 1) && (authentication != 0)) {
564 pr_err(
"Illegal value for authentication parameter:"
565 " %u, ignoring request.\n", authentication);
569 memset(buf1, 0,
sizeof(buf1));
570 memset(buf2, 0,
sizeof(buf2));
576 if (authentication) {
581 if (!
strncmp(none + 4,
",", 1)) {
587 len =
sprintf(buf2,
"%s", buf1);
589 sprintf(buf2 + len,
"%s", none);
611 pr_debug(
"%s iSCSI Authentication Methods for TPG: %hu.\n",
624 pr_err(
"Requested Login Timeout %u larger than maximum"
628 pr_err(
"Requested Logout Timeout %u smaller than"
634 pr_debug(
"Set Logout Timeout to %u for Target Portal Group"
647 pr_err(
"Requested Network Interface Timeout %u larger"
648 " than maximum %u\n", netif_timeout,
652 pr_err(
"Requested Network Interface Timeout %u smaller"
653 " than minimum %u\n", netif_timeout,
659 pr_debug(
"Set Network Interface Timeout to %u for"
671 if ((flag != 0) && (flag != 1)) {
672 pr_err(
"Illegal value %d\n", flag);
677 pr_debug(
"iSCSI_TPG[%hu] - Generate Initiator Portal Group ACLs: %s\n",
681 pr_debug(
"Explicitly setting cache_dynamic_acls=1 when "
682 "generate_node_acls=1\n");
696 pr_err(
"Requested Default Queue Depth: %u larger"
697 " than maximum %u\n", tcq_depth,
701 pr_err(
"Requested Default Queue Depth: %u smaller"
702 " than minimum %u\n", tcq_depth,
708 pr_debug(
"iSCSI_TPG[%hu] - Set Default CmdSN TCQ Depth to %u\n",
720 if ((flag != 0) && (flag != 1)) {
721 pr_err(
"Illegal value %d\n", flag);
726 pr_debug(
"Skipping cache_dynamic_acls=0 when"
727 " generate_node_acls=1\n");
732 pr_debug(
"iSCSI_TPG[%hu] - Cache Dynamic Initiator Portal Group"
734 "Enabled" :
"Disabled");
745 if ((flag != 0) && (flag != 1)) {
746 pr_err(
"Illegal value %d\n", flag);
751 pr_debug(
"iSCSI_TPG[%hu] - Demo Mode Write Protect bit: %s\n",
763 if ((flag != 0) && (flag != 1)) {
764 pr_err(
"Illegal value %d\n", flag);
769 pr_debug(
"iSCSI_TPG[%hu] - Production Mode Write Protect bit:"