Merge tag '5.2-smb3' of git://git.samba.org/sfrench/cifs-2.6
[sfrench/cifs-2.6.git] / include / scsi / scsi_transport_fc.h
index 15da45dc2a5d09b1ee472a3b61cece783ee8b68f..b375c3303fe28d350a5b928b925b4851e31212a2 100644 (file)
@@ -165,6 +165,9 @@ enum fc_tgtid_binding_type  {
 #define FC_PORT_ROLE_FCP_INITIATOR             0x02
 #define FC_PORT_ROLE_IP_PORT                   0x04
 #define FC_PORT_ROLE_FCP_DUMMY_INITIATOR       0x08
+#define FC_PORT_ROLE_NVME_INITIATOR            0x10
+#define FC_PORT_ROLE_NVME_TARGET               0x20
+#define FC_PORT_ROLE_NVME_DISCOVERY            0x40
 
 /* The following are for compatibility */
 #define FC_RPORT_ROLE_UNKNOWN                  FC_PORT_ROLE_UNKNOWN
@@ -473,6 +476,7 @@ enum fc_host_event_code  {
        FCH_EVT_PORT_ONLINE             = 0x202,
        FCH_EVT_PORT_FABRIC             = 0x204,
        FCH_EVT_LINK_UNKNOWN            = 0x500,
+       FCH_EVT_LINK_FPIN               = 0x501,
        FCH_EVT_VENDOR_UNIQUE           = 0xffff,
 };
 
@@ -755,7 +759,7 @@ fc_remote_port_chkready(struct fc_rport *rport)
        return result;
 }
 
-static inline u64 wwn_to_u64(u8 *wwn)
+static inline u64 wwn_to_u64(const u8 *wwn)
 {
        return get_unaligned_be64(wwn);
 }
@@ -798,11 +802,17 @@ u32 fc_get_event_number(void);
 void fc_host_post_event(struct Scsi_Host *shost, u32 event_number,
                enum fc_host_event_code event_code, u32 event_data);
 void fc_host_post_vendor_event(struct Scsi_Host *shost, u32 event_number,
-               u32 data_len, char * data_buf, u64 vendor_id);
+               u32 data_len, char *data_buf, u64 vendor_id);
+void fc_host_post_fc_event(struct Scsi_Host *shost, u32 event_number,
+               enum fc_host_event_code event_code,
+               u32 data_len, char *data_buf, u64 vendor_id);
        /* Note: when specifying vendor_id to fc_host_post_vendor_event()
-        *   be sure to read the Vendor Type and ID formatting requirements
-        *   specified in scsi_netlink.h
+        *   or fc_host_post_fc_event(), be sure to read the Vendor Type
+        *   and ID formatting requirements specified in scsi_netlink.h
+        * Note: when calling fc_host_post_fc_event(), vendor_id may be
+        *   specified as 0.
         */
+void fc_host_fpin_rcv(struct Scsi_Host *shost, u32 fpin_len, char *fpin_buf);
 struct fc_vport *fc_vport_create(struct Scsi_Host *shost, int channel,
                struct fc_vport_identifiers *);
 int fc_vport_terminate(struct fc_vport *vport);