]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/scsi/libfc.h
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
[karo-tx-linux.git] / include / scsi / libfc.h
index 3b8f5d83611bce18f201cfdfd6df5e0311233ef8..24193c1b0da0eaf99478c8801d00439b17378249 100644 (file)
@@ -158,6 +158,7 @@ struct fc_rport_libfc_priv {
        #define FC_RP_FLAGS_REC_SUPPORTED       (1 << 0)
        #define FC_RP_FLAGS_RETRY               (1 << 1)
        #define FC_RP_STARTED                   (1 << 2)
+       #define FC_RP_FLAGS_CONF_REQ            (1 << 3)
        unsigned int               e_d_tov;
        unsigned int               r_a_tov;
 };
@@ -207,6 +208,11 @@ struct fc_rport_priv {
        u32                         supported_classes;
        u16                         prli_count;
        struct rcu_head             rcu;
+       u16                         sp_features;
+       u8                          spp_type;
+       void                        (*lld_event_callback)(struct fc_lport *,
+                                                     struct fc_rport_priv *,
+                                                     enum fc_rport_event);
 };
 
 /**
@@ -571,6 +577,13 @@ struct libfc_function_template {
         */
        struct fc_seq *(*seq_assign)(struct fc_lport *, struct fc_frame *);
 
+       /*
+        * Release the reference on the sequence returned by seq_assign().
+        *
+        * STATUS: OPTIONAL
+        */
+       void (*seq_release)(struct fc_seq *);
+
        /*
         * Reset an exchange manager, completing all sequences and exchanges.
         * If s_id is non-zero, reset only exchanges originating from that FID.
@@ -669,6 +682,15 @@ struct libfc_function_template {
         */
        void (*rport_destroy)(struct kref *);
 
+       /*
+        * Callback routine after the remote port is logged in
+        *
+        * STATUS: OPTIONAL
+        */
+       void (*rport_event_callback)(struct fc_lport *,
+                                    struct fc_rport_priv *,
+                                    enum fc_rport_event);
+
        /*
         * Send a fcp cmd from fsp pkt.
         * Called with the SCSI host lock unlocked and irqs disabled.
@@ -763,6 +785,15 @@ struct fc_disc {
                              enum fc_disc_event);
 };
 
+/*
+ * Local port notifier and events.
+ */
+extern struct blocking_notifier_head fc_lport_notifier_head;
+enum fc_lport_event {
+       FC_LPORT_EV_ADD,
+       FC_LPORT_EV_DEL,
+};
+
 /**
  * struct fc_lport - Local port
  * @host:                  The SCSI host associated with a local port
@@ -803,8 +834,10 @@ struct fc_disc {
  * @lso_max:               The maximum large offload send size
  * @fcts:                  FC-4 type mask
  * @lp_mutex:              Mutex to protect the local port
- * @list:                  Handle for list of local ports
+ * @list:                  Linkage on list of vport peers
  * @retry_work:            Handle to local port for delayed retry context
+ * @prov:                 Pointers available for use by passive FC-4 providers
+ * @lport_list:            Linkage on module-wide list of local ports
  */
 struct fc_lport {
        /* Associations */
@@ -860,6 +893,8 @@ struct fc_lport {
        struct mutex                   lp_mutex;
        struct list_head               list;
        struct delayed_work            retry_work;
+       void                           *prov[FC_FC4_PROV_SIZE];
+       struct list_head               lport_list;
 };
 
 /**
@@ -1014,6 +1049,7 @@ struct fc_lport *libfc_vport_create(struct fc_vport *, int privsize);
 struct fc_lport *fc_vport_id_lookup(struct fc_lport *, u32 port_id);
 int fc_lport_bsg_request(struct fc_bsg_job *);
 void fc_lport_set_local_id(struct fc_lport *, u32 port_id);
+void fc_lport_iterate(void (*func)(struct fc_lport *, void *), void *);
 
 /*
  * REMOTE PORT LAYER