aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libfc.h
diff options
context:
space:
mode:
authorNeerav Parikh <neerav.parikh@intel.com>2012-01-22 20:30:05 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 09:08:58 -0500
commitd78c317f6cd701bda9f6dbfbfbcba72f39dd6ad7 (patch)
tree54ae30e3856fd44b2d5629300517041d79528651 /include/scsi/libfc.h
parent1ea2c1daf4476ac798b1de8196f11dd36425b5ae (diff)
[SCSI] libfc: Add support for FDMI
This patch adds support for Fabric Device Management Interface as per FC-GS-4 spec. in libfc. Any driver making use of libfc can enable fdmi state machine for a given lport. If lport has enabled FDMI support the lport state machine will transition into FDMI after completing the DNS states and before entering the SCR state. The FDMI state transition is such that if there is an error, it won't stop the lport state machine from transitioning and the it will behave as if there was no FDMI support. The FDMI HBA attributes are registed with the Management server via Register HBA (RHBA) command and the port attributes are reigstered using the Register Port(RPA) command. Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Acked-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi/libfc.h')
-rw-r--r--include/scsi/libfc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 6a3922fe0be0..8f9dfba3fcf0 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -30,6 +30,7 @@
30 30
31#include <scsi/fc/fc_fcp.h> 31#include <scsi/fc/fc_fcp.h>
32#include <scsi/fc/fc_ns.h> 32#include <scsi/fc/fc_ns.h>
33#include <scsi/fc/fc_ms.h>
33#include <scsi/fc/fc_els.h> 34#include <scsi/fc/fc_els.h>
34#include <scsi/fc/fc_gs.h> 35#include <scsi/fc/fc_gs.h>
35 36
@@ -52,6 +53,8 @@
52 * @LPORT_ST_RPN_ID: Register port name by ID (RPN_ID) sent 53 * @LPORT_ST_RPN_ID: Register port name by ID (RPN_ID) sent
53 * @LPORT_ST_RFT_ID: Register Fibre Channel types by ID (RFT_ID) sent 54 * @LPORT_ST_RFT_ID: Register Fibre Channel types by ID (RFT_ID) sent
54 * @LPORT_ST_RFF_ID: Register FC-4 Features by ID (RFF_ID) sent 55 * @LPORT_ST_RFF_ID: Register FC-4 Features by ID (RFF_ID) sent
56 * @LPORT_ST_FDMI: Waiting for mgmt server rport to become ready
57 * @LPORT_ST_RHBA:
55 * @LPORT_ST_SCR: State Change Register (SCR) sent 58 * @LPORT_ST_SCR: State Change Register (SCR) sent
56 * @LPORT_ST_READY: Ready for use 59 * @LPORT_ST_READY: Ready for use
57 * @LPORT_ST_LOGO: Local port logout (LOGO) sent 60 * @LPORT_ST_LOGO: Local port logout (LOGO) sent
@@ -66,6 +69,11 @@ enum fc_lport_state {
66 LPORT_ST_RSPN_ID, 69 LPORT_ST_RSPN_ID,
67 LPORT_ST_RFT_ID, 70 LPORT_ST_RFT_ID,
68 LPORT_ST_RFF_ID, 71 LPORT_ST_RFF_ID,
72 LPORT_ST_FDMI,
73 LPORT_ST_RHBA,
74 LPORT_ST_RPA,
75 LPORT_ST_DHBA,
76 LPORT_ST_DPRT,
69 LPORT_ST_SCR, 77 LPORT_ST_SCR,
70 LPORT_ST_READY, 78 LPORT_ST_READY,
71 LPORT_ST_LOGO, 79 LPORT_ST_LOGO,
@@ -797,6 +805,7 @@ enum fc_lport_event {
797 * @host: The SCSI host associated with a local port 805 * @host: The SCSI host associated with a local port
798 * @ema_list: Exchange manager anchor list 806 * @ema_list: Exchange manager anchor list
799 * @dns_rdata: The directory server remote port 807 * @dns_rdata: The directory server remote port
808 * @ms_rdata: The management server remote port
800 * @ptp_rdata: Point to point remote port 809 * @ptp_rdata: Point to point remote port
801 * @scsi_priv: FCP layer internal data 810 * @scsi_priv: FCP layer internal data
802 * @disc: Discovery context 811 * @disc: Discovery context
@@ -842,6 +851,7 @@ struct fc_lport {
842 struct Scsi_Host *host; 851 struct Scsi_Host *host;
843 struct list_head ema_list; 852 struct list_head ema_list;
844 struct fc_rport_priv *dns_rdata; 853 struct fc_rport_priv *dns_rdata;
854 struct fc_rport_priv *ms_rdata;
845 struct fc_rport_priv *ptp_rdata; 855 struct fc_rport_priv *ptp_rdata;
846 void *scsi_priv; 856 void *scsi_priv;
847 struct fc_disc disc; 857 struct fc_disc disc;
@@ -877,6 +887,7 @@ struct fc_lport {
877 u32 does_npiv:1; 887 u32 does_npiv:1;
878 u32 npiv_enabled:1; 888 u32 npiv_enabled:1;
879 u32 point_to_multipoint:1; 889 u32 point_to_multipoint:1;
890 u32 fdmi_enabled:1;
880 u32 mfs; 891 u32 mfs;
881 u8 max_retry_count; 892 u8 max_retry_count;
882 u8 max_rport_retry_count; 893 u8 max_rport_retry_count;