From d78c317f6cd701bda9f6dbfbfbcba72f39dd6ad7 Mon Sep 17 00:00:00 2001 From: Neerav Parikh Date: Sun, 22 Jan 2012 17:30:05 -0800 Subject: [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 Tested-by: Ross Brattain Acked-by: Robert Love Signed-off-by: James Bottomley --- include/scsi/libfc.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/scsi/libfc.h') 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 @@ #include #include +#include #include #include @@ -52,6 +53,8 @@ * @LPORT_ST_RPN_ID: Register port name by ID (RPN_ID) sent * @LPORT_ST_RFT_ID: Register Fibre Channel types by ID (RFT_ID) sent * @LPORT_ST_RFF_ID: Register FC-4 Features by ID (RFF_ID) sent + * @LPORT_ST_FDMI: Waiting for mgmt server rport to become ready + * @LPORT_ST_RHBA: * @LPORT_ST_SCR: State Change Register (SCR) sent * @LPORT_ST_READY: Ready for use * @LPORT_ST_LOGO: Local port logout (LOGO) sent @@ -66,6 +69,11 @@ enum fc_lport_state { LPORT_ST_RSPN_ID, LPORT_ST_RFT_ID, LPORT_ST_RFF_ID, + LPORT_ST_FDMI, + LPORT_ST_RHBA, + LPORT_ST_RPA, + LPORT_ST_DHBA, + LPORT_ST_DPRT, LPORT_ST_SCR, LPORT_ST_READY, LPORT_ST_LOGO, @@ -797,6 +805,7 @@ enum fc_lport_event { * @host: The SCSI host associated with a local port * @ema_list: Exchange manager anchor list * @dns_rdata: The directory server remote port + * @ms_rdata: The management server remote port * @ptp_rdata: Point to point remote port * @scsi_priv: FCP layer internal data * @disc: Discovery context @@ -842,6 +851,7 @@ struct fc_lport { struct Scsi_Host *host; struct list_head ema_list; struct fc_rport_priv *dns_rdata; + struct fc_rport_priv *ms_rdata; struct fc_rport_priv *ptp_rdata; void *scsi_priv; struct fc_disc disc; @@ -877,6 +887,7 @@ struct fc_lport { u32 does_npiv:1; u32 npiv_enabled:1; u32 point_to_multipoint:1; + u32 fdmi_enabled:1; u32 mfs; u8 max_retry_count; u8 max_rport_retry_count; -- cgit v1.2.3