aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libfc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/libfc.h')
-rw-r--r--include/scsi/libfc.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index f53c8e31d5fb..3ae2a760b4f3 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -35,6 +35,8 @@
35 35
36#include <scsi/fc_frame.h> 36#include <scsi/fc_frame.h>
37 37
38#define FC_FC4_PROV_SIZE (FC_TYPE_FCP + 1) /* size of tables */
39
38/* 40/*
39 * libfc error codes 41 * libfc error codes
40 */ 42 */
@@ -179,6 +181,7 @@ struct fc_rport_libfc_priv {
179 * @rp_mutex: The mutex that protects the remote port 181 * @rp_mutex: The mutex that protects the remote port
180 * @retry_work: Handle for retries 182 * @retry_work: Handle for retries
181 * @event_callback: Callback when READY, FAILED or LOGO states complete 183 * @event_callback: Callback when READY, FAILED or LOGO states complete
184 * @prli_count: Count of open PRLI sessions in providers
182 * @rcu: Structure used for freeing in an RCU-safe manner 185 * @rcu: Structure used for freeing in an RCU-safe manner
183 */ 186 */
184struct fc_rport_priv { 187struct fc_rport_priv {
@@ -202,6 +205,7 @@ struct fc_rport_priv {
202 struct list_head peers; 205 struct list_head peers;
203 struct work_struct event_work; 206 struct work_struct event_work;
204 u32 supported_classes; 207 u32 supported_classes;
208 u16 prli_count;
205 struct rcu_head rcu; 209 struct rcu_head rcu;
206}; 210};
207 211
@@ -848,6 +852,28 @@ struct fc_lport {
848 struct delayed_work retry_work; 852 struct delayed_work retry_work;
849}; 853};
850 854
855/**
856 * struct fc4_prov - FC-4 provider registration
857 * @prli: Handler for incoming PRLI
858 * @prlo: Handler for session reset
859 * @recv: Handler for incoming request
860 * @module: Pointer to module. May be NULL.
861 */
862struct fc4_prov {
863 int (*prli)(struct fc_rport_priv *, u32 spp_len,
864 const struct fc_els_spp *spp_in,
865 struct fc_els_spp *spp_out);
866 void (*prlo)(struct fc_rport_priv *);
867 void (*recv)(struct fc_lport *, struct fc_frame *);
868 struct module *module;
869};
870
871/*
872 * Register FC-4 provider with libfc.
873 */
874int fc_fc4_register_provider(enum fc_fh_type type, struct fc4_prov *);
875void fc_fc4_deregister_provider(enum fc_fh_type type, struct fc4_prov *);
876
851/* 877/*
852 * FC_LPORT HELPER FUNCTIONS 878 * FC_LPORT HELPER FUNCTIONS
853 *****************************/ 879 *****************************/