Print this page
NEX-3856 panic is occurred in module "fct" due to a NULL pointer dereference
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Steve Peng <steve.peng@nexenta.com>
NEX-3277 Panic of both nodes in failover time (FC clients)
        Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
        Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
NEX-2787 Multiple comstar / fibre channel / qlt threads stuck waiting on locks with a spinning interrupt thread
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Approved by: Jean McCormack <jean.mccormack@nexenta.com>
        
@@ -18,10 +18,11 @@
  *
  * CDDL HEADER END
  */
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  * Use is subject to license terms.
  */
 #ifndef _FCT_IMPL_H
 #define _FCT_IMPL_H
 
@@ -70,11 +71,11 @@
         fct_cmd_t               *icmd_cmd;
         uint32_t                 icmd_alloc_size;
         fct_struct_id_t          icmd_struct_id;
         uint32_t                 icmd_flags;
         clock_t                  icmd_start_time;
-        struct fct_i_cmd        *icmd_next;     /* iport_abort_queue and irp */
+        list_node_t             icmd_node;      /* iport_abort_queue and irp */
         struct fct_i_cmd        *icmd_solcmd_next;      /* iport_solcmd_queue */
         fct_icmd_cb_t            icmd_cb;
         void                    *icmd_cb_private;
 } fct_i_cmd_t;
 
@@ -114,11 +115,11 @@
         struct fct_i_remote_port        *irp_next;
 
         /* For queueing to handle elses */
         struct fct_i_remote_port        *irp_discovery_next;
 
-        fct_i_cmd_t                     *irp_els_list;
+        list_t                          irp_els_list;
 
         /*
          * sa stands for session affecting, nsa is non session affecting.
          * The els counts only represent elses under progress not the ones
          * that are terminated. active_xchg_count covers everything including
@@ -142,14 +143,16 @@
          * Most HBAs will only register symbolic node name instead of port name,
          * so we use SNN as session alias.
          */
         stmf_scsi_session_t             *irp_session;
         char                            *irp_snn;
+        uint16_t                        irp_snn_len;
 
         /* items will be filled in ns cmd */
         uint8_t                         irp_fc4types[32]; /* FC-4 types */
         char                            *irp_spn;       /* port symbolic name */
+        uint16_t                        irp_spn_len;
         uint32_t                        irp_cos;        /* class of service */
 
         uint32_t                        irp_rscn_counter;
 } fct_i_remote_port_t;
 
@@ -230,11 +233,11 @@
 
         /*
          * # of free cmds sitting on the iport_cached_cmdlist
          */
         uint32_t                iport_cached_ncmds;
-        struct fct_i_cmd        *iport_cached_cmdlist;
+        list_t                  iport_cached_cmdlist;
         kmutex_t                iport_cached_cmd_lock;
 
         /*
          * To release free cmds periodically
          */
@@ -259,12 +262,12 @@
         ddi_taskq_t             *iport_worker_taskq;
         kmutex_t                iport_worker_lock;
         kcondvar_t              iport_worker_cv;
         struct fct_i_event      *iport_event_head;
         struct fct_i_event      *iport_event_tail;
-        struct fct_i_cmd        *iport_abort_queue;
-        struct fct_i_cmd        **iport_ppicmd_term;
+        list_t                  iport_abort_queue;
+        struct fct_i_cmd        *iport_ppicmd_term;
 
         /* link initialization */
         fct_status_t            iport_li_comp_status;
         enum fct_li_state       iport_li_state;
 
@@ -433,10 +436,11 @@
 void fct_gcs_cb(fct_i_cmd_t *icmd);
 void fct_gft_cb(fct_i_cmd_t *icmd);
 void fct_gspn_cb(fct_i_cmd_t *icmd);
 void fct_rls_cb(fct_i_cmd_t *icmd);
 disc_action_t fct_process_link_init(fct_i_local_port_t *iport);
+void fct_cmd_unlink_els(fct_i_remote_port_t *irp, fct_i_cmd_t *icmd);
 
 #ifdef  __cplusplus
 }
 #endif