]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'target-updates/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 9 Apr 2015 07:59:53 +0000 (17:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 9 Apr 2015 07:59:53 +0000 (17:59 +1000)
1  2 
drivers/scsi/qla2xxx/tcm_qla2xxx.c
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_erl0.c
drivers/target/loopback/tcm_loop.c
drivers/target/target_core_sbc.c
drivers/target/target_core_spc.c
drivers/target/target_core_transport.c
drivers/vhost/scsi.c

Simple merge
index 2accb6e47beb35c1eff10256f7a85d749fe6d590,cd611e740de75bc34c5593852812e87068c1c748..41337fe920bdbc439513404069687bfbcce6f9a5
@@@ -4256,19 -4226,30 +4226,36 @@@ int iscsit_close_connection
        pr_debug("Closing iSCSI connection CID %hu on SID:"
                " %u\n", conn->cid, sess->sid);
        /*
 -       * Always up conn_logout_comp just in case the RX Thread is sleeping
 -       * and the logout response never got sent because the connection
 -       * failed.
 +       * Always up conn_logout_comp for the traditional TCP case just in case
 +       * the RX Thread in iscsi_target_rx_opcode() is sleeping and the logout
 +       * response never got sent because the connection failed.
 +       *
 +       * However for iser-target, isert_wait4logout() is using conn_logout_comp
 +       * to signal logout response TX interrupt completion.  Go ahead and skip
 +       * this for iser since isert_rx_opcode() does not wait on logout failure,
 +       * and to avoid iscsi_conn pointer dereference in iser-target code.
         */
 -      complete(&conn->conn_logout_comp);
 +      if (conn->conn_transport->transport_type == ISCSI_TCP)
 +              complete(&conn->conn_logout_comp);
  
-       iscsi_release_thread_set(conn);
+       if (!strcmp(current->comm, ISCSI_RX_THREAD_NAME)) {
+               if (conn->tx_thread &&
+                   cmpxchg(&conn->tx_thread_active, true, false)) {
+                       send_sig(SIGINT, conn->tx_thread, 1);
+                       kthread_stop(conn->tx_thread);
+               }
+       } else if (!strcmp(current->comm, ISCSI_TX_THREAD_NAME)) {
+               if (conn->rx_thread &&
+                   cmpxchg(&conn->rx_thread_active, true, false)) {
+                       send_sig(SIGINT, conn->rx_thread, 1);
+                       kthread_stop(conn->rx_thread);
+               }
+       }
+       spin_lock(&iscsit_global->ts_bitmap_lock);
+       bitmap_release_region(iscsit_global->ts_bitmap, conn->bitmap_id,
+                             get_order(1));
+       spin_unlock(&iscsit_global->ts_bitmap_lock);
  
        iscsit_stop_timers_for_cmds(conn);
        iscsit_stop_nopin_response_timer(conn);
index bdd8731a4daa677083d829333fc651591ebca046,e1f4c7eedb089282df06a1a03f5ee70923700ee3..959a14c9dd5d65f1cbd3ff4e37a8d3480ee9f177
@@@ -22,8 -22,8 +22,7 @@@
  #include <target/target_core_fabric.h>
  
  #include <target/iscsi/iscsi_target_core.h>
 -#include <target/iscsi/iscsi_transport.h>
  #include "iscsi_target_seq_pdu_list.h"
- #include "iscsi_target_tq.h"
  #include "iscsi_target_erl0.h"
  #include "iscsi_target_erl1.h"
  #include "iscsi_target_erl2.h"
Simple merge
Simple merge
Simple merge
Simple merge