From 8cdffdccd948ea4872b7b65280bc04f2fa93fc96 Mon Sep 17 00:00:00 2001 From: Yi Zou Date: Fri, 20 Nov 2009 14:54:57 -0800 Subject: [SCSI] libfcoe: add checking disable flag in FIP_FKA_ADV When the D bit is set if the FKA_ADV_Period of the FIP Discovery Advertisement, the ENode should not transmit period ENode FIP Keep Alive and VN_Port FIP Keep Alive (FC-BB-5 Rev2, 7.8.3.13). Note that fcf->flags is taken directly from the fip_header, I am claiming one bit for the purpose of the FIP_FKA_Period D bit as FIP_FL_FK_ADV_B, and use FIP_HEADER_FLAGS as bitmask for bits used in fip_header. Signed-off-by: Yi Zou Signed-off-by: Robert Love Signed-off-by: James Bottomley --- include/scsi/fc/fc_fip.h | 12 +++++++++++- include/scsi/libfcoe.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/scsi/fc/fc_fip.h b/include/scsi/fc/fc_fip.h index 3d138c1fcf8a..17baa19380f0 100644 --- a/include/scsi/fc/fc_fip.h +++ b/include/scsi/fc/fc_fip.h @@ -214,10 +214,20 @@ struct fip_vn_desc { */ struct fip_fka_desc { struct fip_desc fd_desc; - __u8 fd_resvd[2]; + __u8 fd_resvd; + __u8 fd_flags; /* bit0 is fka disable flag */ __be32 fd_fka_period; /* adv./keep-alive period in mS */ } __attribute__((packed)); +/* + * flags for fip_fka_desc.fd_flags + */ +enum fip_fka_flags { + FIP_FKA_ADV_D = 0x01, /* no need for FKA from ENode */ +}; + +/* FIP_DT_FKA flags */ + /* * FIP_DT_VENDOR descriptor. */ diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 3837872f1965..c603f4a7e7fc 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h @@ -155,6 +155,7 @@ struct fcoe_fcf { u8 pri; u16 flags; u32 fka_period; + u8 fd_flags:1; }; /* FIP API functions */ -- cgit v1.2.3-59-g8ed1b