]> Pileus Git - ~andy/linux/blobdiff - include/scsi/libfc.h
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / include / scsi / libfc.h
index f3f320f1d399f060f8971522f05ce23ad470d17e..65dc9aacbf703b79874e32f8f61484a3e58856e9 100644 (file)
@@ -143,21 +143,22 @@ enum fc_rport_state {
        RPORT_ST_RTV,           /* waiting for RTV completion */
        RPORT_ST_READY,         /* ready for use */
        RPORT_ST_LOGO,          /* port logout sent */
+       RPORT_ST_ADISC,         /* Discover Address sent */
        RPORT_ST_DELETE,        /* port being deleted */
 };
 
 /**
  * struct fc_disc_port - temporary discovery port to hold rport identifiers
- * @lp: Fibre Channel host port instance
- * @peers: node for list management during discovery and RSCN processing
- * @ids: identifiers structure to pass to fc_remote_port_add()
- * @rport_work: work struct for starting the rport state machine
+ * @lp:         Fibre Channel host port instance
+ * @peers:      Node for list management during discovery and RSCN processing
+ * @rport_work: Work struct for starting the rport state machine
+ * @port_id:    Port ID of the discovered port
  */
 struct fc_disc_port {
        struct fc_lport             *lp;
        struct list_head            peers;
-       struct fc_rport_identifiers ids;
        struct work_struct          rport_work;
+       u32                         port_id;
 };
 
 enum fc_rport_event {
@@ -202,6 +203,7 @@ struct fc_rport_libfc_priv {
  * @ids: remote port identifiers and roles
  * @flags: REC and RETRY supported flags
  * @max_seq: maximum number of concurrent sequences
+ * @disc_id: discovery identifier
  * @maxframe_size: maximum frame size
  * @retries: retry count in current state
  * @e_d_tov: error detect timeout value (in msec)
@@ -218,6 +220,7 @@ struct fc_rport_priv {
        struct fc_rport_identifiers ids;
        u16                        flags;
        u16                        max_seq;
+       u16                        disc_id;
        u16                        maxframe_size;
        unsigned int               retries;
        unsigned int               e_d_tov;
@@ -563,10 +566,11 @@ struct libfc_function_template {
        int (*lport_reset)(struct fc_lport *);
 
        /*
-        * Create a remote port
+        * Create a remote port with a given port ID
+        *
+        * STATUS: OPTIONAL
         */
-       struct fc_rport_priv *(*rport_create)(struct fc_lport *,
-                                             struct fc_rport_identifiers *);
+       struct fc_rport_priv *(*rport_create)(struct fc_lport *, u32);
 
        /*
         * Initiates the RP state machine. It is called from the LP module.
@@ -595,7 +599,7 @@ struct libfc_function_template {
         * STATUS: OPTIONAL
         */
        void (*rport_recv_req)(struct fc_seq *, struct fc_frame *,
-                              struct fc_rport_priv *);
+                              struct fc_lport *);
 
        /*
         * lookup an rport by it's port ID.
@@ -674,11 +678,11 @@ struct libfc_function_template {
 /* information used by the discovery layer */
 struct fc_disc {
        unsigned char           retry_count;
-       unsigned char           delay;
        unsigned char           pending;
        unsigned char           requested;
        unsigned short          seq_count;
        unsigned char           buf_len;
+       u16                     disc_id;
 
        void (*disc_callback)(struct fc_lport *,
                              enum fc_disc_event);
@@ -1081,4 +1085,9 @@ void fc_destroy_exch_mgr(void);
 int fc_setup_rport(void);
 void fc_destroy_rport(void);
 
+/*
+ * Internal libfc functions.
+ */
+const char *fc_els_resp_type(struct fc_frame *);
+
 #endif /* _LIBFC_H_ */